org.alfresco.util
Class Pair

java.lang.Object
  extended by org.alfresco.util.Pair
All Implemented Interfaces:
java.io.Serializable

public final class Pair
extends java.lang.Object
implements java.io.Serializable

Utility class for containing two things that aren't like each other

See Also:
Serialized Form

Field Summary
static Pair NULL_PAIR
           
 
Constructor Summary
Pair(java.lang.Object first, java.lang.Object second)
          Make a new one.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.Object getFirst()
          Get the first member of the tuple.
 java.lang.Object getSecond()
          Get the second member of the tuple.
 int hashCode()
           
static Pair nullPair()
           
 void setFirst(java.lang.Object first)
           
 void setSecond(java.lang.Object second)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_PAIR

public static final Pair NULL_PAIR
Constructor Detail

Pair

public Pair(java.lang.Object first,
            java.lang.Object second)
Make a new one.

Parameters:
first - The first member.
second - The second member.
Method Detail

nullPair

public static final Pair nullPair()

getFirst

public final java.lang.Object getFirst()
Get the first member of the tuple.

Returns:
The first member.

getSecond

public final java.lang.Object getSecond()
Get the second member of the tuple.

Returns:
The second member.

setFirst

public final void setFirst(java.lang.Object first)

setSecond

public final void setSecond(java.lang.Object second)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.