Package core.components
Class Card
- java.lang.Object
-
- core.components.Card
-
-
Constructor Summary
Constructors Constructor Description Card()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
equals method of the Card classint
getId()
id getterstatic int
getNumberOfCards()
numberOfCards getterint
hashCode()
hashCode method of the Card class we compare with respect to the idjava.lang.String
toString()
toString method of the Card class
-
-
-
Method Detail
-
getId
public int getId()
id getter- Returns:
- the generated id of the new object
-
getNumberOfCards
public static int getNumberOfCards()
numberOfCards getter- Returns:
- the number of Cards in the application
-
toString
public java.lang.String toString()
toString method of the Card class- Overrides:
toString
in classjava.lang.Object
- Returns:
- : a standard class toString
-
equals
public boolean equals(java.lang.Object o)
equals method of the Card class- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- : an object o- Returns:
- : id == card.id
-
hashCode
public int hashCode()
hashCode method of the Card class we compare with respect to the id- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hash(id)
-
-