|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--mstar.PlayerMap
A class that implements a general map for storing information about player in the collaborative environment, and a set of methods for searching for players in the map. In addition there are a set of methods for reading and writing the maps to disk in both Java object format and pseudo-MAAS-Neotek format.
| Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
PlayerMap()
Create an empty player map. |
|
PlayerMap(MudPlayer player)
Create a player map and add the specified player. |
|
| Method Summary | |
void |
add(MudPlayer player)
Adds a player to the map and writes the map back to disk. |
void |
fastAdd(MudPlayer player)
Adds a player to the map but does not write the maps to disk. |
int |
getId()
Returns the player identifier for the next player. |
java.lang.String |
getMapFilename()
Gets the output filename for the map |
MudPlayer |
getMudPlayer(int id)
Given the id of a player in the map locate and return that player. |
MudPlayer |
getMudPlayer(MudPlayer p)
Given a player find the player in the map. |
MudPlayer |
getMudPlayer(java.lang.String name)
Locate a player with the given name. |
static PlayerMap |
loadMap()
Loads the player map from disk. |
boolean |
playerExists(int id)
Determines if a player in the map exists with the given id. |
boolean |
playerExists(MudPlayer theMudPlayer)
Determines if a MudPlayer in the map exists given another MudPlayer. |
boolean |
playerExists(java.lang.String name)
Determines if a player in the map exists with the given name. |
void |
setMapFilename(java.lang.String mapFilename)
Sets the output filename for the map |
java.lang.String |
toString()
Returns a String representation of the map. |
void |
WriteMap()
Writes the map out in psuedo-MAAS-Neotek format. |
void |
WriteMapAsObjects()
Write the map out to disk as a set of Java objects. |
| Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
clone,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
equals,
firstElement,
get,
hashCode,
indexOf,
indexOf,
insertElementAt,
isEmpty,
lastElement,
lastIndexOf,
lastIndexOf,
remove,
remove,
removeAll,
removeAllElements,
removeElement,
removeElementAt,
removeRange,
retainAll,
set,
setElementAt,
setSize,
size,
subList,
toArray,
toArray,
trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator,
listIterator,
listIterator |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public PlayerMap()
public PlayerMap(MudPlayer player)
player - the player to be added to the map.| Method Detail |
public int getId()
the - integer identifier for the next player to be added.public static PlayerMap loadMap()
public void add(MudPlayer player)
player - the player to add to the map.public void fastAdd(MudPlayer player)
player - the player to add to the map.public MudPlayer getMudPlayer(MudPlayer p)
p - the player to locate in the map.public MudPlayer getMudPlayer(int id)
id - of the player to locate in the map.public MudPlayer getMudPlayer(java.lang.String name)
name - the name of the player to locate.public boolean playerExists(java.lang.String name)
name - of the player to check for.public boolean playerExists(int id)
id - of the player to check for.public boolean playerExists(MudPlayer theMudPlayer)
theMudPlayer - to check the map for.public java.lang.String toString()
public void setMapFilename(java.lang.String mapFilename)
mapFilename - the filename that should be used for reading and
writing the map.public java.lang.String getMapFilename()
public void WriteMapAsObjects()
public void WriteMap()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||