dsto.dfc.collections
Class Pair
java.lang.Object
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
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()
|
first
public Object first
- The first field of the pair.
second
public Object second
- The second field of the pair.
Pair
public Pair(Object a,
Object b)
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