Class Card

  • Direct Known Subclasses:
    Vlibre, Vmax

    public abstract class Card
    extends java.lang.Object
    The (abstract) Card class : it implements the card object
    • 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 class
      int getId()
      id getter
      static int getNumberOfCards()
      numberOfCards getter
      int hashCode()
      hashCode method of the Card class we compare with respect to the id
      java.lang.String toString()
      toString method of the Card class
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Card

        public Card()
    • 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 class java.lang.Object
        Returns:
        : a standard class toString
      • equals

        public boolean equals​(java.lang.Object o)
        equals method of the Card class
        Overrides:
        equals in class java.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 class java.lang.Object
        Returns:
        hash(id)