mobios.type
Class Pair
java.lang.Object
mobios.type.Pair
- All Implemented Interfaces:
- Serializable, Comparable
public class Pair
- extends Object
- implements Serializable, Comparable
A simple wrapper to wrap two object together.
- Version:
- 2003.07.27
- Author:
- Rui Mao
- See Also:
- Serialized Form
FirstComparator
public static final Comparator<Object> FirstComparator
SecondComparator
public static final Comparator SecondComparator
Pair
public Pair(Object first,
Object second)
- Constructor.
first
public Object first()
- Returns:
- the first object wrapped
second
public Object second()
- Returns:
- the second object wrapped.
toString
public String toString()
- Overrides:
toString
in class Object
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
main
public static void main(String[] args)
(C) 2002 - 2006 The MoBIoS Group