|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.CivList
The this class handles look-up of specific civilizations by their unique ID. Currently civilizations are never removed from this list even when thie civilization is eliminated from game play. This is done in order to facilitate historical information display. This may change in the future.
Field Summary | |
private static DBTable |
DB
|
Constructor Summary | |
private |
CivList()
This is declared private as no actual instance of this class is ever created (all methods are static). |
Method Summary | |
static void |
add(Civ obj)
This method adds the given civilization to the master list of those currently in the game. |
static java.util.Enumeration |
elements()
This method returns an enumeration of all civilizations currently in the game. |
static Civ |
get(CivID id)
This method returns the civilization with the given ID. |
(package private) static void |
readObject(java.io.ObjectInputStream in)
This method takes the list of civilizations stored in the given stream (previously written using writeObject) as the current list of those available in the game. |
static Civ |
remove(CivID id)
This method removes the given civilization from the master list of those currently in the game. |
static int |
size()
This method returns the number of civilizations in the game. |
(package private) static void |
writeObject(java.io.ObjectOutputStream out)
This method adds the current list of civilizations to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static DBTable DB
Constructor Detail |
private CivList()
Method Detail |
public static void add(Civ obj)
obj
- The civilization to be added.public static Civ remove(CivID id)
public static Civ get(CivID id)
id
- The unique ID of the desired civilization object.CivUndefined
public static int size()
static void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
readObject( java.io.ObjectInputStream in )
static void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
writeObject( java.io.ObjectOutputStream out )
public static java.util.Enumeration elements()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |