|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.utility.PairPQ<P,Q>
P - Type of first object p.Q - Type of second object q.public class PairPQ<P,Q>
Title: PairPQ - stores a pair of objects of arbitrary types.
Description: Encapsulates a pair (p,q) of Objects with p of type P and q of type Q.
Copyright: Copyright (c) Hedgehog Software 2007-2009.
Company: Hedgehog Software.
| Field Summary | |
|---|---|
protected P |
mp
Object p. |
protected Q |
mq
Object q. |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
PairPQ()
Default constructor. |
|
PairPQ(PairPQ<P,Q> object)
Copy onstructor. |
|
PairPQ(P p,
Q q)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Tests whether or not the specified object is equal to this object. |
P |
getP()
Returns the p object. |
Q |
getQ()
Returns the q object. |
int |
hashCode()
Returns the hash code for this object; ie (1 << mp.hashCode()) + mq.hashCode(); |
boolean |
samePair(PairPQ pair)
Tests for equality of this pair and the specified pair. |
boolean |
setP(P newP)
Sets the p object. |
boolean |
setQ(Q newQ)
Sets the q object. |
java.lang.String |
toString()
Returns a String representation of a PairPQ 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 P mp
protected Q mq
| Constructor Detail |
|---|
public PairPQ()
public PairPQ(P p,
Q q)
p - Object p.q - Object q.public PairPQ(PairPQ<P,Q> object)
object - Object to copy.| Method Detail |
|---|
public P getP()
public Q getQ()
public boolean samePair(PairPQ pair)
pair - Other pair.
public boolean setP(P newP)
newP - New p object.
public boolean setQ(Q newQ)
newQ - New q object.
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in interface java.util.Comparatorequals in class HObjectobject - Object to compare.
public int hashCode()
hashCode in class HObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||