-footer

garrettsmith.playingcards
Class Card.Color

java.lang.Object
  extended by garrettsmith.playingcards.Card.Color
Enclosing class:
Card

public static class Card.Color
extends java.lang.Object

Represents the card's color: red, black, or none. Colors are immutable.


Field Summary
static Card.Color BLACK
          Indicates a black card.
static Card.Color NONE
          Indicates a card with no color.
static Card.Color RED
          Indicates a red card.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns whether object is a Color equal to this one.
 int hashCode()
          Returns a hash value for this card.
 java.lang.String toString()
          Returns a string representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RED

public static final Card.Color RED
Indicates a red card.


BLACK

public static final Card.Color BLACK
Indicates a black card.


NONE

public static final Card.Color NONE
Indicates a card with no color.

Method Detail

equals

public boolean equals(java.lang.Object object)
Returns whether object is a Color equal to this one.

Overrides:
equals in class java.lang.Object
Returns:
true if the objects are equal, false otherwise

hashCode

public int hashCode()
Returns a hash value for this card.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash value for this object.

toString

public java.lang.String toString()
Returns a string representation.

Overrides:
toString in class java.lang.Object

-footer

Copyright 2001-5 Garrett Smith. Use is subject to license terms.