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 booleanequals(java.lang.Object o)equals method of the Card classintgetId()id getterstatic intgetNumberOfCards()numberOfCards getterinthashCode()hashCode method of the Card class we compare with respect to the idjava.lang.StringtoString()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:
toStringin classjava.lang.Object- Returns:
- : a standard class toString
-
equals
public boolean equals(java.lang.Object o)
equals method of the Card class- Overrides:
equalsin 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:
hashCodein classjava.lang.Object- Returns:
- hash(id)
-
-