Package org.alfresco.util
Class Pair<F,S>
- java.lang.Object
-
- org.alfresco.util.Pair<F,S>
-
- All Implemented Interfaces:
java.io.Serializable
@AlfrescoPublicApi public final class Pair<F,S> extends java.lang.Object implements java.io.Serializable
Utility class for containing two things that aren't like each other- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
F
getFirst()
Get the first member of the tuple.S
getSecond()
Get the second member of the tuple.int
hashCode()
static <X,Y>
Pair<X,Y>nullPair()
void
setFirst(F first)
void
setSecond(S second)
java.lang.String
toString()
-
-
-
Field Detail
-
NULL_PAIR
public static final Pair NULL_PAIR
-
-
Method Detail
-
nullPair
public static final <X,Y> Pair<X,Y> nullPair()
-
getFirst
public final F getFirst()
Get the first member of the tuple.- Returns:
- The first member.
-
getSecond
public final S getSecond()
Get the second member of the tuple.- Returns:
- The second member.
-
setFirst
public final void setFirst(F first)
-
setSecond
public final void setSecond(S second)
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-