Class Tuple2<T0,​T1>

  • All Implemented Interfaces:
    java.io.Serializable

    public class Tuple2<T0,​T1>
    extends java.lang.Object
    implements java.io.Serializable
    A type for tuples. Might be replaced by existing classes for this purpose, such as from the Scala library.
    See Also:
    Serialized Form
    • Field Detail

      • field0

        public T0 field0
      • field1

        public T1 field1
    • Constructor Detail

      • Tuple2

        public Tuple2()
      • Tuple2

        public Tuple2​(T0 field0,
                      T1 field1)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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

        public T0 getField0()
      • getField1

        public T1 getField1()
      • swap

        public Tuple2<T1,​T0> swap()
        Returns:
        a new instance with the fields of this instance swapped