Mobios v0.91

mobios.type
Class Pair

java.lang.Object
  extended by 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

Field Summary
static Comparator<Object> FirstComparator
           
static Comparator SecondComparator
           
 
Constructor Summary
Pair(Object first, Object second)
          Constructor.
 
Method Summary
 int compareTo(Object o)
           
 Object first()
           
static void main(String[] args)
           
 Object second()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FirstComparator

public static final Comparator<Object> FirstComparator

SecondComparator

public static final Comparator SecondComparator
Constructor Detail

Pair

public Pair(Object first,
            Object second)
Constructor.

Method Detail

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)

Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group