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 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.
-
-
-
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 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:
equals
in classjava.lang.Object
- Parameters:
o
- The object for which to make the determination.- Returns:
true
if the provided object is equal to this object trio, orfalse
if not.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of this object trio.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this object trio.
-
-