|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectks.domain.Table
Represents a Solitaire Table
Field Summary | |
static java.lang.String |
invitationType
|
static int |
maxGameLength
|
static int |
maxIncrement
|
static int |
maxNumPlayers
|
static int |
minGameLength
Min values for game Length (in seconds). |
static int |
minIncrement
Min/Max values for GameIncrement. |
static int |
minNumPlayers
Min/Max values for numPlayers |
static java.lang.String |
openType
|
static java.lang.String |
requestType
|
Constructor Summary | |
Table()
Table constructor comment. |
Method Summary | |
static Table |
fromString(java.lang.String s)
Recover a Table object from the given string [the inverse of toString] |
java.lang.String |
getAccessType()
Get Access permissions for this table. |
int |
getCount()
Return the player index to next be added (0 through numPlayers-1). |
int |
getGameIncrement()
Return the game increment for this table. |
int |
getGameLength()
Return the gameLength for this table. |
java.lang.String |
getModerator()
Get moderator for the table. |
java.lang.String |
getName()
Return the name of this table. |
int |
getNumPlayers()
Return the number of players on this table. |
int |
getSeed()
Return the seed to be used for this table. |
java.lang.String |
getType()
Return the solitaire type of this table. |
boolean |
hasUser(java.lang.String name)
Determines if user is already a member of this table |
boolean |
isActive()
Determine whether Table is active. |
boolean |
isReady()
Determines whether a table is ready for play |
boolean |
join(java.lang.String name)
User userName wishes to join this table. |
boolean |
leave(java.lang.String name)
User userName wishes to leave this table. |
java.util.Enumeration |
players()
Return an Enumeration (of String) of player names for this table. |
void |
setAccessType(java.lang.String newAccess)
Set the Table's Access rights. |
void |
setActive(boolean newActive)
Set the active status for this table. |
void |
setGameIncrement(int newIncrement)
Sets the increment for the next seed on a table (a number from minIncrment..maxIncrement). |
void |
setGameLength(int newGameLength)
Set the time for a game (in seconds). |
void |
setModerator(java.lang.String newModerator)
Set moderator for the table. |
void |
setName(java.lang.String newName)
Set the name of the table (alphanumeric, no spaces). |
void |
setNumPlayers(int newNumPlayers)
Sets the number of players in this table. |
void |
setSeed(int newSeed)
Set the seed for the table. |
void |
setType(java.lang.String newType)
Set the type of solitaire game for this table. |
java.lang.String |
toString()
Convert into ':'-separated string, suitable for being transported over the wire. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int minNumPlayers
public static final int maxNumPlayers
public static final int minIncrement
public static final int maxIncrement
public static final int minGameLength
public static final int maxGameLength
public static final java.lang.String invitationType
public static final java.lang.String openType
public static final java.lang.String requestType
Constructor Detail |
public Table()
Method Detail |
public static Table fromString(java.lang.String s)
s
- String
public int getCount()
public int getGameIncrement()
public int getGameLength()
public java.lang.String getModerator()
public java.lang.String getName()
public int getNumPlayers()
public int getSeed()
public java.lang.String getType()
public boolean hasUser(java.lang.String name)
name
- String
public boolean isActive()
public boolean isReady()
public boolean join(java.lang.String name)
name
- String
public boolean leave(java.lang.String name)
name
- String
public java.util.Enumeration players()
public void setActive(boolean newActive)
newActive
- booleanpublic void setGameIncrement(int newIncrement)
newIncrement
- int
java.lang.IllegalArgumentException
- if newIncrement is an invalid value.public void setGameLength(int newGameLength)
newGameLength
- int
java.lang.IllegalArgumentException
- if newGameLength is an invalid value.public void setModerator(java.lang.String newModerator)
ERROR: SHOULD VERIFY THAT MODERATOR IS IN TABLE!
newModerator
- Stringpublic void setName(java.lang.String newName)
newName
- Stringpublic void setNumPlayers(int newNumPlayers)
newNumPlayers
- int
java.lang.IllegalArgumentException
- if newNumPlayers is an invalid number.public void setSeed(int newSeed)
newSeed
- int
java.lang.IllegalArgumentException
- if newSeed is an invalid amount.public void setType(java.lang.String newType)
newType
- Stringpublic java.lang.String toString()
public java.lang.String getAccessType()
public void setAccessType(java.lang.String newAccess)
newAccess
- String
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |