All Packages Class Hierarchy This Package Previous Next Index
Class COM.objectspace.jgl.Pair
java.lang.Object
|
+----COM.objectspace.jgl.Pair
- public class Pair
- extends Object
- implements Serializable
A Pair is an object that contains two other objects. It is
most commonly used for conveniently storing and passing pairs
of objects.
-
first
- The first object.
-
second
- The second object.
-
Pair()
- Construct myself to hold a pair of objects initially null.
-
Pair(Object, Object)
- Construct myself to hold a pair of objects.
-
Pair(Pair)
- Construct myself to be a copy of an existing Pair.
-
clone()
- Return a copy of myself.
-
equals(Object)
- Compares two Objects for equality.
-
equals(Pair)
-
-
hashCode()
- Return my hash code.
-
toString()
- Return a string that describes me.
first
public Object first
- The first object.
second
public Object second
- The second object.
Pair
public Pair(Object x,
Object y)
- Construct myself to hold a pair of objects.
- Parameters:
- x - The first object.
- y - The second object.
Pair
public Pair()
- Construct myself to hold a pair of objects initially null.
Pair
public Pair(Pair pair)
- Construct myself to be a copy of an existing Pair.
- Parameters:
- pair - The Pair to copy.
hashCode
public int hashCode()
- Return my hash code.
- Overrides:
- hashCode in class Object
toString
public String toString()
- Return a string that describes me.
- Overrides:
- toString in class Object
equals
public boolean equals(Object object)
- Compares two Objects for equality.
- Overrides:
- equals in class Object
equals
public boolean equals(Pair pair)
clone
public synchronized Object clone()
- Return a copy of myself.
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index