Class Tuple4<A0,A1,A2,A3>

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

public class Tuple4<A0,A1,A2,A3> extends Object implements Tuploid4<A0,A1,A2,A3>, Serializable
Implementation of a tuple with four components.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tuple4(A0 elem0, A1 elem1, A2 elem2, A3 elem3)
    Only constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Tuple4<?,?,?,?> t)
    Check whether all components of both tuples are equal.
    boolean
    Check whether o is a 4-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.
    Get the value of the fourth component.
    int

    Methods inherited from class java.lang.Object

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

    • Tuple4

      public Tuple4(@Opt A0 elem0, @Opt A1 elem1, @Opt A2 elem2, @Opt A3 elem3)
      Only constructor.
      Parameters:
      elem0 - the value for the first component
      elem1 - the value for the second component
      elem2 - the value for the third component
      elem3 - the value for the fourth component
  • Method Details

    • get0

      @Opt 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

      @Opt 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

      @Opt 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.
    • get3

      @Opt public A3 get3()
      Get the value of the fourth component.
      Specified by:
      get3 in interface Tuploid4<A0,A1,A2,A3>
      Returns:
      the value of the fourth component.
    • equals

      public boolean equals(Object o)
      Check whether o is a 4-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 4-tuple and both tuples have equal components.
    • equals

      public boolean equals(Tuple4<?,?,?,?> t)
      Check whether all components of both tuples are equal.
      Parameters:
      t - the 4-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