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 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.