|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RoomnumberSet
A class for holding CoffeeMud-style room IDs of the form AreaName#[NUMBER], for instance, Midgaard#3001 This class is totally awesome because it stores them in an efficient way (holding room ids 5-10 not as 5,6,7,8,9,10, but as 5,10), but sorts them for quick reads. Stores the internal numbers using LongSet
LongSet| Method Summary | |
|---|---|
void |
add(RoomnumberSet set)
Adds a set of room ids to this object |
void |
add(java.lang.String str)
Adds the given room id to this object |
boolean |
contains(java.lang.String str)
Returns whether the given room id is stored here |
java.util.Iterator<java.lang.String> |
getAreaNames()
Returns an enumerator for all area names in this object |
LongSet |
getGrouper(java.lang.String areaName)
Returns the number parts of the room ids stored in this object for a given area. |
java.util.Enumeration<java.lang.String> |
getRoomIDs()
Returns an enumerator for all room ids in this object |
boolean |
isEmpty()
Returns whether any rooms at all are defined. |
void |
parseXML(java.lang.String xml)
Restores this object from an xml document |
java.lang.String |
random()
Returns a random, fully qualified room id from those stored in here. |
void |
remove(java.lang.String str)
Removes a single room id from this object |
int |
roomCount(java.lang.String areaName)
Returns the number of room ids stored for the given Area name. |
int |
roomCountAllAreas()
Returns the total number of room ids stored here |
java.lang.String |
xml()
Converts the contents of this object into an xml document. |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, name, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
int roomCount(java.lang.String areaName)
areaName - the Area to count the rooms of
int roomCountAllAreas()
boolean isEmpty()
boolean contains(java.lang.String str)
str - the room id to look for
java.lang.String xml()
void parseXML(java.lang.String xml)
xml - contents for this object as an xmlvoid add(java.lang.String str)
str - a room idvoid add(RoomnumberSet set)
set - the room ids to addvoid remove(java.lang.String str)
str - the room id to remove from this objectjava.lang.String random()
java.util.Enumeration<java.lang.String> getRoomIDs()
java.util.Iterator<java.lang.String> getAreaNames()
LongSet getGrouper(java.lang.String areaName)
areaName - the area name to look for
LongSet
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||