Package com.groiss.ds

Class Triple<F,S,T>

java.lang.Object
com.groiss.ds.Triple<F,S,T>
All Implemented Interfaces:
Serializable

public class Triple<F,S,T> extends Object implements Serializable
A Triple is an object that contains three other objects. It is most commonly used for conveniently storing and passing triples of objects.
See Also:
  • Field Details

    • first

      public F first
      The first object.
    • second

      public S second
      The second object.
    • third

      public T third
      The third object.
  • Constructor Details

    • Triple

      public Triple()
    • Triple

      public Triple(F first, S second, T third)
      Constructor for holding a pair of objects.
  • Method Details

    • toString

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

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • from

      public static <F, S, T> Triple<F,S,T> from(F first, S second, T third)