amber.type.server
Class Pair

java.lang.Object
  |
  +--amber.type.server.Pair

public class Pair
extends java.lang.Object


Field Summary
 java.lang.Object first
          First object of the pair.
 java.lang.Object second
          Second object of the pair.
 
Constructor Summary
Pair()
          Default Constructor.
Pair(java.lang.Object first, java.lang.Object second)
          Initialising Constructor.
Pair(Pair other)
          Initialising copy Constructor.
 
Method Summary
 java.lang.Object clone()
          Return a copy of this object.
 boolean equals(java.lang.Object other)
          This function determines if the two objects are equal.
 java.lang.Object getFirst()
          Gets the data in the following variable: First object of the pair.
 java.lang.Object getSecond()
          Gets the data in the following variable: Second object of the pair.
 int hashCode()
          This function returns a unique hash code for this object.
 void setFirst(java.lang.Object data)
          Sets the data in the following variable: First object of the pair.
 void setSecond(java.lang.Object data)
          Sets the data in the following variable: Second object of the pair.
 java.lang.String toString()
          This function returns the String form of the data.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public java.lang.Object first
First object of the pair.

second

public java.lang.Object second
Second object of the pair.
Constructor Detail

Pair

public Pair()
Default Constructor.

Pair

public Pair(java.lang.Object first,
            java.lang.Object second)
Initialising Constructor.
Parameters:
first - First object of the pair.
second - Second object of the pair.

Pair

public Pair(Pair other)
Initialising copy Constructor. This constructor performs a shallow copy operation.
Parameters:
other - The object to use when initialising this object.
Method Detail

getFirst

public java.lang.Object getFirst()
Gets the data in the following variable: First object of the pair.
Returns:
Object containing the required information.

getSecond

public java.lang.Object getSecond()
Gets the data in the following variable: Second object of the pair.
Returns:
Object containing the required information.

setFirst

public void setFirst(java.lang.Object data)
Sets the data in the following variable: First object of the pair.
Parameters:
data - Object containing the data to set the variable to.

setSecond

public void setSecond(java.lang.Object data)
Sets the data in the following variable: Second object of the pair.
Parameters:
data - Object containing the data to set the variable to.

toString

public java.lang.String toString()
This function returns the String form of the data.
Overrides:
toString in class java.lang.Object
Returns:
String containing the string version of this class.

hashCode

public int hashCode()
This function returns a unique hash code for this object.
Overrides:
hashCode in class java.lang.Object
Returns:
int containing the hashcode.

equals

public boolean equals(java.lang.Object other)
This function determines if the two objects are equal.
Overrides:
equals in class java.lang.Object
Parameters:
other - Object to match to this object.
Returns:
boolean true if the objects match.

clone

public java.lang.Object clone()
Return a copy of this object. It performs a shallow copy.
Overrides:
clone in class java.lang.Object


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.