org.springframework.extensions.surf.util
Class Pair<F,S>
java.lang.Object
org.springframework.extensions.surf.util.Pair<F,S>
- All Implemented Interfaces:
- Serializable
public final class Pair<F,S>
- extends Object
- implements Serializable
Utility class for containing two things that aren't like each other
- See Also:
- Serialized Form
Constructor Summary |
Pair(F first,
S second)
Make a new one. |
NULL_PAIR
public static final Pair NULL_PAIR
Pair
public Pair(F first,
S second)
- Make a new one.
- Parameters:
first
- The first member.second
- The second member.
nullPair
public static final <X,Y> Pair<X,Y> nullPair()
getFirst
public F getFirst()
- Get the first member of the tuple.
- Returns:
- The first member.
getSecond
public S getSecond()
- Get the second member of the tuple.
- Returns:
- The second member.
setFirst
public void setFirst(F first)
setSecond
public void setSecond(S second)
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009 SpringSource, Inc. All Rights Reserved.