Class Triple<F,​S,​T>

  • Type Parameters:
    F - the first type, which you want to defined
    S - the second type which you want to defined
    T - the third type which you want to defined

    public class Triple<F,​S,​T>
    extends java.lang.Object
    This class can capture 3 references of 3 types and set or clear the data using setFirst() / getFirst() and setSecond() / getSecond(). It can be used to return multiple objects of a method, or to easily capture multiple objects without creating their own class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected F first
      The reference of the first value and the type of F
      protected S second
      The reference of the second value and the type of S
      protected T third
      The reference of the third value and the type of T
    • Constructor Summary

      Constructors 
      Constructor Description
      Triple()  
      Triple​(F first, S second, T third)  
    • Field Detail

      • first

        protected F first
        The reference of the first value and the type of F
        See Also:
        Triple
      • second

        protected S second
        The reference of the second value and the type of S
        See Also:
        Triple
      • third

        protected T third
        The reference of the third value and the type of T
        See Also:
        Triple
    • Constructor Detail

      • Triple

        public Triple​(F first,
                      S second,
                      T third)
      • Triple

        public Triple()
    • Method Detail

      • getFirst

        public F getFirst()
      • setFirst

        public void setFirst​(F first)
      • getSecond

        public S getSecond()
      • setSecond

        public void setSecond​(S second)
      • getThird

        public T getThird()
      • setThird

        public void setThird​(T third)