Class ObjectTrio<F,S,T>

java.lang.Object
com.unboundid.util.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:
Serializable

@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ObjectTrio<F,S,T> extends Object implements 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:
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether the provided object is equal to this object trio.
    Retrieves the first object in this trio.
    Retrieves the second object in this trio.
    Retrieves the third object in this trio.
    int
    Retrieves a hash code for this object trio.
    Retrieves a string representation of this object trio.
    void
    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 Details

    • 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 Details

    • 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 Object
      Returns:
      A hash code for this object trio.
    • equals

      public boolean equals(@Nullable Object o)
      Indicates whether the provided object is equal to this object trio.
      Overrides:
      equals in class 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

      Retrieves a string representation of this object trio.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object trio.
    • toString

      public void toString(@NotNull 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.