ostore.util
Class QSPair

java.lang.Object
  |
  +--ostore.util.QSPair
All Implemented Interfaces:
QuickSerializable

public final class QSPair
extends Object
implements QuickSerializable

Pair for QS classes.

Version:
$Id: QSPair.java,v 1.1 2003/03/14 22:28:03 jeffpang Exp $
Author:
Jeff Pang
See Also:
Pair

Field Summary
 QuickSerializable first
           
 QuickSerializable second
           
 
Constructor Summary
QSPair()
          Default constructor
QSPair(InputBuffer buffer)
           
QSPair(QuickSerializable f, QuickSerializable s)
          Constructor
 
Method Summary
 boolean equals(Object other)
           
 QuickSerializable first()
          Returns the first element of the pair.
 int hashCode()
           
 QuickSerializable second()
          Returns the second element of the pair.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public QuickSerializable first

second

public QuickSerializable second
Constructor Detail

QSPair

public QSPair()
Default constructor


QSPair

public QSPair(QuickSerializable f,
              QuickSerializable s)
Constructor

Parameters:
f - == first object of the pair
s - == second object of the pair

QSPair

public QSPair(InputBuffer buffer)
       throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to

first

public final QuickSerializable first()
Returns the first element of the pair.

Returns:
The first element of the pair.

second

public final QuickSerializable second()
Returns the second element of the pair.

Returns:
The second element of the pair.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object