|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrlgamekit.objects.Cardinal
public class Cardinal
A class made as a key class for map lookup operations. It allows to set the key value, so one Cardinal object can be used for many lookups, without the need to instantiate new key objects all over (as would be needed with Integer keys). Be careful though, not to change the key value of Cardinals that are kept in maps already as keys. It can be used in mixed comparisons with Integer objects.
Registry| Constructor Summary | |
|---|---|
Cardinal(int value)
Create a new Cardinal with the given value. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
Cardinals can equal other Cardinals as well as Integers. |
int |
hashCode()
|
int |
intValue()
|
void |
set(int value)
Set a new int value for this Cardinal. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Cardinal(int value)
value - The initial value.| Method Detail |
|---|
public int intValue()
public void set(int value)
value - The new value.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the object to compare to.
Integer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||