org.vizzini.game.cardgame
Class AbstractCard

java.lang.Object
  extended by org.vizzini.game.AbstractToken
      extended by org.vizzini.game.cardgame.AbstractCard
All Implemented Interfaces:
Serializable, Cloneable, Comparable, ICard, IToken
Direct Known Subclasses:
PokerCard

public abstract class AbstractCard
extends AbstractToken
implements ICard

Provides a card for card games in the game framework.

Since:
v0.1
Version:
v0.2
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.vizzini.game.AbstractToken
UNKNOWN_NAME
 
Fields inherited from interface org.vizzini.game.cardgame.ICard
SUIT_PROPERTY
 
Fields inherited from interface org.vizzini.game.IToken
AGENT_PROPERTY, NAME_PROPERTY, POSITION_PROPERTY, TEAM_PROPERTY
 
Constructor Summary
AbstractCard()
           
 
Method Summary
 int compareTo(Object object)
          Compare this to the given object.
 boolean equals(Object object)
          Return true if this equals the given object.
 ISuit getSuit()
          Return the suit.
 int hashCode()
          Returns a hash code value for the object.
 void setSuit(ISuit suit)
          Set the suit.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class org.vizzini.game.AbstractToken
addPropertyChangeListener, clone, configure, copy, getAgent, getIndex, getName, getPosition, getPropertyChangeManager, getTeam, getValue, isFiringPositionChanges, removePropertyChangeListener, setAgent, setFiringPositionChanges, setIndex, setName, setPosition, setTeam, setValue
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.vizzini.game.cardgame.ICard
getIndex
 
Methods inherited from interface org.vizzini.game.IToken
addPropertyChangeListener, clone, configure, getAgent, getName, getPosition, getTeam, getValue, removePropertyChangeListener, setAgent, setName, setPosition, setTeam, setValue
 

Constructor Detail

AbstractCard

public AbstractCard()
Method Detail

setSuit

public void setSuit(ISuit suit)
Set the suit.

Specified by:
setSuit in interface ICard
Since:
v0.1

getSuit

public ISuit getSuit()
Return the suit.

Specified by:
getSuit in interface ICard
Since:
v0.1

compareTo

public int compareTo(Object object)
Compare this to the given object.

Specified by:
compareTo in interface Comparable
Returns:
-1,0,1 if this is less than, equal to, greater than object.
Throws:
ClassCastException - if another is not an instance of AbstractCard.
Since:
v0.1

equals

public boolean equals(Object object)
Return true if this equals the given object.

Overrides:
equals in class AbstractToken
Parameters:
object - The object to compare.
Since:
v0.1

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class AbstractToken
Since:
v0.1

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class AbstractToken
Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02