Package esmska.data

Class Tuple<A,​B>

  • All Implemented Interfaces:
    java.io.Serializable

    public class Tuple<A,​B>
    extends java.lang.Object
    implements java.io.Serializable
    Container for tuple of two objects of different classes.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected A v1  
      protected B v2  
    • Constructor Summary

      Constructors 
      Constructor Description
      Tuple​(A v1, B v2)
      Create new tuple of two objects.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      A get1()
      Get first object
      B get2()
      Get second object
      int hashCode()  
      void set1​(A v1)
      Set first object
      void set2​(B v2)
      Set second object
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • v1

        protected A v1
      • v2

        protected B v2
    • Constructor Detail

      • Tuple

        public Tuple​(A v1,
                     B v2)
        Create new tuple of two objects.
        Parameters:
        v1 - first object
        v2 - second object
    • Method Detail

      • get1

        public A get1()
        Get first object
      • set1

        public void set1​(A v1)
        Set first object
      • get2

        public B get2()
        Get second object
      • set2

        public void set2​(B v2)
        Set second object
      • equals

        public boolean equals​(java.lang.Object obj)
        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