org.vizzini.game.cardgame
Class AbstractSuit

java.lang.Object
  extended by org.vizzini.game.cardgame.AbstractSuit
All Implemented Interfaces:
Serializable, Comparable, ISuit
Direct Known Subclasses:
DefaultSuit

public abstract class AbstractSuit
extends Object
implements ISuit

Provides base functionality for a suit for card games in the game framework.

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

Constructor Summary
AbstractSuit()
           
 
Method Summary
 int compareTo(Object object)
          Compare this to the given object.
 void configure(Properties properties, int index)
          Configure this suit.
 boolean equals(Object object)
          Return true if this equals the given object.
 String getName()
          Return the name.
 int hashCode()
          Returns a hash code value for the object.
 void setName(String name)
          Set the name.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSuit

public AbstractSuit()
Method Detail

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

configure

public void configure(Properties properties,
                      int index)
Configure this suit.

Specified by:
configure in interface ISuit
Parameters:
properties - Source of configuration information.
index - Index of this suit's properties.
Since:
v0.1

equals

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

Overrides:
equals in class Object
Since:
v0.1

getName

public String getName()
Return the name.

Specified by:
getName in interface ISuit
Since:
v0.1

hashCode

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

Overrides:
hashCode in class Object
Since:
v0.1

setName

public void setName(String name)
Set the name.

Specified by:
setName in interface ISuit
Since:
v0.1

toString

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

Overrides:
toString in class Object
Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02