Package com.unboundid.util
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:
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 booleanequals(java.lang.Object o)Indicates whether the provided object is equal to this object trio.FgetFirst()Retrieves the first object in this trio.SgetSecond()Retrieves the second object in this trio.TgetThird()Retrieves the third object in this trio.inthashCode()Retrieves a hash code for this object trio.java.lang.StringtoString()Retrieves a string representation of this object trio.voidtoString(java.lang.StringBuilder buffer)Appends a string representation of this object trio to the provided buffer.
-
-
-
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:
hashCodein classjava.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:
equalsin classjava.lang.Object- Parameters:
o- The object for which to make the determination.- Returns:
trueif the provided object is equal to this object trio, orfalseif not.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of this object trio.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of this object trio.
-
-