Tuples (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util.functional, class: Tuples

Package org.apache.hadoop.util.functional

# Class Tuples

java.lang.Object
org.apache.hadoop.util.functional.Tuples

@Unstable public final class Tuples extends Object
Tuple support. This allows for tuples to be passed around as part of the public API without committing to a third-party library tuple implementation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <K, V> Map.Entry<K,V>`
  `pair(K key, V value)`
  Create a 2-tuple.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### pair

    public static <K, V> Map.Entry<K,V> pair(K key, V value)
    Create a 2-tuple.
    Type Parameters:
      `K` - element 1 type
      `V` - element 2 type
    Parameters:
      `key` - element 1
      `value` - element 2
    Returns:
      a tuple.