Class Triplet<T1,T2,T3>

java.lang.Object
sk.iway.iwcm.utils.Triplet<T1,T2,T3>

public class Triplet<T1,T2,T3> extends Object
Triplet.java An ordered 3-tuple, containing objects passed as arguments to constructor. Can be used in methods that seemingly ought to return 3 values. Those methods can return an instance of Triplet class, without the need to construct a new class.
See Also:
  • Field Details

    • first

      public final T1 first
    • second

      public final T2 second
    • third

      public final T3 third
  • Constructor Details

    • Triplet

      public Triplet(T1 first, T2 second, T3 third)
  • Method Details

    • of

      public static <T1, T2, T3> Triplet<T1,T2,T3> of(T1 first, T2 second, T3 third)
    • 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