Interface TupleMapper<T,​R>

  • Type Parameters:
    R - The return type of the apply method
    All Superinterfaces:
    Function<T,​R>

    public interface TupleMapper<T,​R>
    extends Function<T,​R>
    A BasicTupleMapper may be used to map from an object of type T to a Tuple
    Author:
    pemi
    • Method Detail

      • degree

        int degree()
        Returns the degree of the Tuple. For example, a Tuple2 has a degree of 2 whereas a Tuple3 has a degree of 3.
        Returns:
        the degree of the Tuple
      • get

        Function<T,​?> get​(int index)
        Gets the mapper at the given index. For example, get(0) will return the first mapper and get(1) will return the second etc.
        Parameters:
        index - of the mapper to get
        Returns:
        the mapper at the given index
        Throws:
        IndexOutOfBoundsException - if index < 0 || index >= length()