|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.simplegamenet.specs.to.PlayerSettingsMap
A map which contains all PlayerSettings
, one for each player who joined the game
session.
PlayerSettings
,
net.sourceforge.simplegamenet.framework.model.EngineImpl#getPlayerSettingsMap()
Constructor Summary | |
PlayerSettingsMap()
|
|
PlayerSettingsMap(Engine engine,
PlayerSettings[] playerSettingsArray)
|
Method Summary | |
void |
addPlayerSettings(PlayerSettings playerSettings)
This method should only be used by the SGN framework. |
boolean |
containsPlayerID(Integer playerID)
Returns true if this map contains a mapping for the specified playerID. |
boolean |
containsPlayerSettings(Integer playerID)
|
int |
getConnectionsAmount()
Returns the number of PlayerSettings . |
PlayerSettings |
getHostPlayerSettings()
Returns the PlayerSettings of the host or null if the map contains
no mapping for the host. |
Integer[] |
getParticipantIDs()
Returns an array of the playerIDs of all the participants that this map contains. |
int |
getParticipantsAmount()
Returns the number of participants. |
PlayerSettings[] |
getParticipantSettingsArray()
Returns an array of the PlayerSettings of all the participants that this map
contains. |
Integer[] |
getPlayerIDs()
Returns an array of all the playerIDs that this map contains. |
PlayerSettings |
getPlayerSettings(Integer playerID)
Returns the PlayerSettings to which the specified playerID is mapped in this
map, or null if the map contains no mapping for the playerID. |
PlayerSettings[] |
getPlayerSettingsArray()
Returns an array of all the PlayerSettings that this map contains. |
String |
getUniqueNickname(String nickname,
Integer ignorablePlayerID)
This method should only be used by the SGN framework. |
PlayerSettings |
removePlayerSettings(Integer playerID)
This method should only be used by the SGN framework. |
void |
updatePlayerSettings(PlayerSettings updatedPlayerSettings)
This method should only be used by the SGN framework. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PlayerSettingsMap()
public PlayerSettingsMap(Engine engine, PlayerSettings[] playerSettingsArray)
Method Detail |
public boolean containsPlayerID(Integer playerID)
true
if this map contains a mapping for the specified playerID.
playerID
- the playerID whose presence in this map is to be tested
true
if this map contains a mapping for the specified playerIDpublic PlayerSettings getPlayerSettings(Integer playerID)
PlayerSettings
to which the specified playerID is mapped in this
map, or null
if the map contains no mapping for the playerID.
playerID
- the playerID whose associated PlayerSettings
is to be returned
PlayerSettings
to which the specified playerID is mapped in this
mappublic PlayerSettings getHostPlayerSettings()
PlayerSettings
of the host or null
if the map contains
no mapping for the host.
PlayerSettings
of the hostpublic Integer[] getPlayerIDs()
public PlayerSettings[] getPlayerSettingsArray()
PlayerSettings
that this map contains.
PlayerSettings
that this map containspublic Integer[] getParticipantIDs()
public PlayerSettings[] getParticipantSettingsArray()
PlayerSettings
of all the participants that this map
contains.
PlayerSettings
of all the participants that this map
containspublic int getParticipantsAmount()
public int getConnectionsAmount()
PlayerSettings
.
PlayerSettings
public boolean containsPlayerSettings(Integer playerID)
public String getUniqueNickname(String nickname, Integer ignorablePlayerID)
nickname
- ignorablePlayerID
-
public void addPlayerSettings(PlayerSettings playerSettings)
playerSettings
- public void updatePlayerSettings(PlayerSettings updatedPlayerSettings)
updatedPlayerSettings
- public PlayerSettings removePlayerSettings(Integer playerID)
playerID
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |