|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCard
Represents a generic Card with a given int ID.
Constructor Summary | |
Card(int id)
Construcs a card with a given id. |
Method Summary | |
int |
compareTo(Card other)
Compares this card with the specified object for order. |
boolean |
equals(java.lang.Object other)
Indicates whether some other object is "equal to" this one. |
int |
getId()
Returns this card's id. |
java.lang.String |
toString()
Returns a String representation of this card. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Card(int id)
id
- this card's id.Method Detail |
public int getId()
public boolean equals(java.lang.Object other)
other
- the reference object with which to compare.
public int compareTo(Card other)
compareTo
in interface Comparable<String>
other
- the card to be compared.
other
.public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |