|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.ID
public class ID
Class for IDs used in Entry, Tournament and Discount objects.
Field Summary | |
---|---|
private long |
id_number
|
Constructor Summary | |
---|---|
ID(long id_str)
Overloaded constructor. |
|
ID(java.lang.String id_str)
Overloaded constructor |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object other)
The compareTo method is overridden so that ID objects can be sorted based on their id numbers. |
boolean |
equals(java.lang.Object other)
Checks whether one ID object is equal to another. |
long |
getIdNumber()
Returns id number. |
int |
hashCode()
Methods hashCode and equals are overridden in order to be able to use ID objects as keys in hashMap objects. |
java.lang.String |
toString()
Method returns a string representation of the ID object |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final transient long id_number
Constructor Detail |
---|
public ID(java.lang.String id_str)
id_str
- discount idpublic ID(long id_str)
id_str
- discount idMethod Detail |
---|
public long getIdNumber()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- ID instance to compare to
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable<java.lang.Object>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |