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.

Version:
2.0.2
Author:
ObjectSpace, Inc.

Variable Index

 o first
The first object.
 o second
The second object.

Constructor Index

 o Pair()
Construct myself to hold a pair of objects initially null.
 o Pair(Object, Object)
Construct myself to hold a pair of objects.
 o Pair(Pair)
Construct myself to be a copy of an existing Pair.

Method Index

 o clone()
Return a copy of myself.
 o equals(Object)
Compares two Objects for equality.
 o equals(Pair)
 o hashCode()
Return my hash code.
 o toString()
Return a string that describes me.

Variables

 o first
 public Object first
The first object.

 o second
 public Object second
The second object.

Constructors

 o Pair
 public Pair(Object x,
             Object y)
Construct myself to hold a pair of objects.

Parameters:
x - The first object.
y - The second object.
 o Pair
 public Pair()
Construct myself to hold a pair of objects initially null.

 o Pair
 public Pair(Pair pair)
Construct myself to be a copy of an existing Pair.

Parameters:
pair - The Pair to copy.

Methods

 o hashCode
 public int hashCode()
Return my hash code.

Overrides:
hashCode in class Object
 o toString
 public String toString()
Return a string that describes me.

Overrides:
toString in class Object
 o equals
 public boolean equals(Object object)
Compares two Objects for equality.

Overrides:
equals in class Object
 o equals
 public boolean equals(Pair pair)
 o clone
 public synchronized Object clone()
Return a copy of myself.

Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index