Class PairImpl<X,​Y>

    • Constructor Summary

      Constructors 
      Constructor Description
      PairImpl​(java.lang.Object... elements)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      X getFirst()
      Get the first element from the tuple.
      Y getSecond()
      Get the second element from the tuple.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.jongsoft.lang.collection.tuple.Tuple

        toList
    • Constructor Detail

      • PairImpl

        public PairImpl​(java.lang.Object... elements)
    • Method Detail

      • getFirst

        public X getFirst()
        Description copied from interface: Pair
        Get the first element from the tuple.
        Specified by:
        getFirst in interface Pair<X,​Y>
        Returns:
        the element
      • getSecond

        public Y getSecond()
        Description copied from interface: Pair
        Get the second element from the tuple.
        Specified by:
        getSecond in interface Pair<X,​Y>
        Returns:
        the element
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object