|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.utility.Pair
public class Pair
Title: Pair - stores a pair of objects of type HObject.
Description: Encapsulates a pair (p,q) of Objects.
Copyright: Copyright (c) Hedgehog Software 2007-2009.
Company: Hedgehog Software.
| Field Summary | |
|---|---|
protected HObject |
p
Object p. |
protected HObject |
q
Object q. |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
Pair()
Default constructor. |
|
Pair(HObject p,
HObject q)
Constructor. |
|
Pair(Pair object)
Copy constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Tests whether or not the specified object is equal to this object. |
HObject |
getP()
Returns the p object. |
HObject |
getQ()
Returns the q object. |
int |
hashCode()
Returns the hash code for this object; ie p.hashCode() ^ q.hashCode(). |
boolean |
samePair(Pair pair,
boolean bothSenses)
Tests for equality of this pair and the specified pair. |
boolean |
setP(HObject newP)
Sets the p object. |
boolean |
setQ(HObject newQ)
Sets the q object. |
java.lang.String |
toString()
Returns a String representation of a Pair object. |
| Methods inherited from class com.hedgehog.HObject |
|---|
clone, compare, compareTo, copy, getID, getName, hasID, hasName, setID, setName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected HObject p
protected HObject q
| Constructor Detail |
|---|
public Pair()
public Pair(HObject p,
HObject q)
p - Object p.q - Object q.public Pair(Pair object)
object - Object to copy.| Method Detail |
|---|
public boolean equals(java.lang.Object object)
equals in interface java.util.Comparatorequals in class HObjectobject - Object to compare.
public int hashCode()
hashCode in class HObjectpublic HObject getP()
public HObject getQ()
public boolean samePair(Pair pair,
boolean bothSenses)
pair - Other pair object.bothSenses - Specifies whether or not both pair object
public boolean setP(HObject newP)
newP - New p object.
public boolean setQ(HObject newQ)
newQ - New q object.
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||