Class ObjectTrio<F,​S,​T>

  • Type Parameters:
    F - The type of the first object.
    S - The type of the second object.
    T - The type of the third object.
    All Implemented Interfaces:
    java.io.Serializable

    @NotMutable
    @ThreadSafety(level=COMPLETELY_THREADSAFE)
    public final class ObjectTrio<F,​S,​T>
    extends java.lang.Object
    implements java.io.Serializable
    This class provides a typed trio of objects. It may be used whenever three objects are required but only one is allowed (e.g., returning three values from a method).
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectTrio​(F first, S second, T third)
      Creates a new object trio with the provided elements.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Indicates whether the provided object is equal to this object trio.
      F getFirst()
      Retrieves the first object in this trio.
      S getSecond()
      Retrieves the second object in this trio.
      T getThird()
      Retrieves the third object in this trio.
      int hashCode()
      Retrieves a hash code for this object trio.
      java.lang.String toString()
      Retrieves a string representation of this object trio.
      void toString​(java.lang.StringBuilder buffer)
      Appends a string representation of this object trio to the provided buffer.
      • Methods inherited from class java.lang.Object

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

      • ObjectTrio

        public ObjectTrio​(@Nullable
                          F first,
                          @Nullable
                          S second,
                          @Nullable
                          T third)
        Creates a new object trio with the provided elements.
        Parameters:
        first - The first object in this trio.
        second - The second object in this trio.
        third - The third object in this trio.
    • Method Detail

      • getFirst

        @Nullable
        public F getFirst()
        Retrieves the first object in this trio.
        Returns:
        The first object in this trio.
      • getSecond

        @Nullable
        public S getSecond()
        Retrieves the second object in this trio.
        Returns:
        The second object in this trio.
      • getThird

        @Nullable
        public T getThird()
        Retrieves the third object in this trio.
        Returns:
        The third object in this trio.
      • hashCode

        public int hashCode()
        Retrieves a hash code for this object trio.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code for this object trio.
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object o)
        Indicates whether the provided object is equal to this object trio.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - The object for which to make the determination.
        Returns:
        true if the provided object is equal to this object trio, or false if not.
      • toString

        @NotNull
        public java.lang.String toString()
        Retrieves a string representation of this object trio.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this object trio.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of this object trio to the provided buffer.
        Parameters:
        buffer - The buffer to which the information should be appended.