Class NTuple4<T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>>

java.lang.Object
de.powerstat.validation.containers.NTuple4<T1,T2,T3,T4>
Type Parameters:
T1 - Type 1
T2 - Type 2
T3 - Type 3
T4 - Type 4
All Implemented Interfaces:
Comparable<NTuple4<T1,T2,T3,T4>>

public final class NTuple4<T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>> extends Object implements Comparable<NTuple4<T1,T2,T3,T4>>
N-Tuple 4.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final T1
    Object1 of type T1.
    private final T2
    Object2 of type T2.
    private final T3
    Object3 of type T3.
    private final T4
    Object4 of type T4.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    NTuple4(T1 obj1, T2 obj2, T3 obj3, T4 obj4)
    Private constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Compare with another object.
    boolean
    Is equal with another object.
    int
    Calculate hash code.
    static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>, T4 extends Comparable<T4>>
    NTuple4<T1,T2,T3,T4>
    of(T1 obj1, T2 obj2, T3 obj3, T4 obj4)
    NTuple3 factory.
    Returns the first value of this NTuple4 as a T1.
    Returns the second value of this NTuple4 as a T2.
    Returns the second value of this NTuple4 as a T3.
    Returns the second value of this NTuple4 as a T4.
    Returns the string representation of this NTuple4.

    Methods inherited from class java.lang.Object

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

    • object1

      private final T1 extends Comparable<T1> object1
      Object1 of type T1.
    • object2

      private final T2 extends Comparable<T2> object2
      Object2 of type T2.
    • object3

      private final T3 extends Comparable<T3> object3
      Object3 of type T3.
    • object4

      private final T4 extends Comparable<T4> object4
      Object4 of type T4.
  • Constructor Details

    • NTuple4

      private NTuple4(T1 obj1, T2 obj2, T3 obj3, T4 obj4)
      Private constructor.
      Parameters:
      obj1 - Object 1 of type T1
      obj2 - Object 2 of Type T2
      obj3 - Object 3 of Type T3
      obj4 - Object 4 of Type T4
  • Method Details

    • of

      public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>, T4 extends Comparable<T4>> NTuple4<T1,T2,T3,T4> of(T1 obj1, T2 obj2, T3 obj3, T4 obj4)
      NTuple3 factory.
      Type Parameters:
      T1 - Type 1
      T2 - Type 2
      T3 - Type 3
      T4 - Type 4
      Parameters:
      obj1 - Object 1 of type T1
      obj2 - Object 2 of Type T2
      obj3 - Object 3 of Type T3
      obj4 - Object 4 of Type T4
      Returns:
      NTuple4 object
    • t1Value

      public T1 t1Value()
      Returns the first value of this NTuple4 as a T1.
      Returns:
      The T1 value represented by this object.
    • t2Value

      public T2 t2Value()
      Returns the second value of this NTuple4 as a T2.
      Returns:
      The T2 value represented by this object.
    • t3Value

      public T3 t3Value()
      Returns the second value of this NTuple4 as a T3.
      Returns:
      The T3 value represented by this object.
    • t4Value

      public T4 t4Value()
      Returns the second value of this NTuple4 as a T4.
      Returns:
      The T4 value represented by this object.
    • hashCode

      public int hashCode()
      Calculate hash code.
      Overrides:
      hashCode in class Object
      Returns:
      Hash
      See Also:
    • equals

      public boolean equals(Object obj)
      Is equal with another object.
      Overrides:
      equals in class Object
      Parameters:
      obj - Object
      Returns:
      true when equal, false otherwise
      See Also:
    • toString

      public String toString()
      Returns the string representation of this NTuple4. The exact details of this representation are unspecified and subject to change, but the following may be regarded as typical: "NTuple4[object1=..., object2=..., object3=..., object4=...]"
      Overrides:
      toString in class Object
      Returns:
      String representation of this NTuple4
      See Also:
    • compareTo

      public int compareTo(NTuple4<T1,T2,T3,T4> obj)
      Compare with another object.
      Specified by:
      compareTo in interface Comparable<T1 extends Comparable<T1>>
      Parameters:
      obj - Object to compare with
      Returns:
      0: equal; 1: greater; -1: smaller
      See Also: