|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.util.IntPair
public class IntPair
A simple class to contain two integers.
Constructor Summary | |
---|---|
IntPair()
Constructs a new IntPair object with both integers
equal to 0. |
|
IntPair(int first,
int second)
Constructs a new IntPair containing the specified integers. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Returns true if the specified object is an instance of
an IntPair whose corresponding two integers are equal
to this IntPair 's two integers. |
int |
first()
Returns the first integer in this integer pair. |
int |
hashCode()
Returns the hash code for this integer pair, which is defined to be 31 * first + second where first and second are the two
integers of this integer pair. |
void |
readExternal(ObjectInput in)
|
int |
second()
Returns the second integer in this integer pair. |
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntPair()
IntPair
object with both integers
equal to 0.
public IntPair(int first, int second)
IntPair
containing the specified integers.
Method Detail |
---|
public int first()
public int second()
public boolean equals(Object obj)
true
if the specified object is an instance of
an IntPair
whose corresponding two integers are equal
to this IntPair
's two integers.
equals
in class Object
public int hashCode()
31 * first + secondwhere
first
and second
are the two
integers of this integer pair.
hashCode
in class Object
public String toString()
toString
in class Object
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |