dsto.dfc.collections
Class Pair

java.lang.Object
  extended by dsto.dfc.collections.Pair
All Implemented Interfaces:
Copyable, Cloneable

public final class Pair
extends Object
implements Copyable

Convenience data storage class for pairing objects.

Version:
$Revision$
Author:
Robbe WT Stewart

Field Summary
 Object first
          The first field of the pair.
 Object second
          The second field of the pair.
 
Constructor Summary
Pair(Object a, Object b)
           
 
Method Summary
 Object clone()
          Create a completely separate copy of this object and any mutable objects owned by the object.
 boolean equals(Object obj)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

first

public Object first
The first field of the pair.


second

public Object second
The second field of the pair.

Constructor Detail

Pair

public Pair(Object a,
            Object b)
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from interface: Copyable
Create a completely separate copy of this object and any mutable objects owned by the object.

NOTE: subclasses should not remove the CloneNotSupportedException throws clause if they themselves support subclassing: removing the CloneNotSupportedException declaration stops subclasses from indicating that a clone was not possible.

Specified by:
clone in interface Copyable
Overrides:
clone in class Object
Throws:
CloneNotSupportedException - if the clone failed or is not possible.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2008 Commonwealth of Australia