Class Tuple3<A0,A1,A2>

java.lang.Object
eu.bandm.tools.util.anon.Tuple3<A0,A1,A2>
Type Parameters:
A0 - the type of the first component.
A1 - the type of the second component.
A2 - the type of the third component.
All Implemented Interfaces:
Tuploid1<A0>, Tuploid2<A0,A1>, Tuploid3<A0,A1,A2>, Serializable

public class Tuple3<A0,A1,A2> extends Object implements Tuploid3<A0,A1,A2>, Serializable
Implementation of a tuple with three components.
See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Tuple3(A0 elem0, A1 elem1, A2 elem2)
    Only constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Tuple3<?,?,?> t)
    Check whether all components of both tuples are equal.
    boolean
    Check whether o is a 3-tuple and all components of both tuples are equal.
    Get the value of the first component.
    Get the value of the second component.
    Get the value of the third component.
    int

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Tuple3

      protected Tuple3(@Opt A0 elem0, @Opt A1 elem1, @Opt A2 elem2)
      Only constructor.
      Parameters:
      elem0 - the value for the first component
      elem1 - the value for the second component
      elem2 - the value for the third component
  • Method Details

    • get0

      public A0 get0()
      Get the value of the first component.
      Specified by:
      get0 in interface Tuploid1<A0>
      Returns:
      the value of the first component.
    • get1

      public A1 get1()
      Get the value of the second component.
      Specified by:
      get1 in interface Tuploid2<A0,A1>
      Returns:
      the value of the second component.
    • get2

      public A2 get2()
      Get the value of the third component.
      Specified by:
      get2 in interface Tuploid3<A0,A1,A2>
      Returns:
      the value of the third component.
    • equals

      public boolean equals(Object o)
      Check whether o is a 3-tuple and all components of both tuples are equal.
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare with
      Returns:
      whether o is a 3-tuple and both tuples have equal components.
    • equals

      public boolean equals(Tuple3<?,?,?> t)
      Check whether all components of both tuples are equal.
      Parameters:
      t - the 3-tuple to compare with
      Returns:
      whether both tuples have equal components.
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object