|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.SystemList
Field Summary | |
private static DBList |
DB
|
Constructor Summary | |
private |
SystemList()
|
Method Summary | |
(package private) static void |
add(SystemBase obj)
This method adds a new system to the master list. |
static java.util.Enumeration |
elements()
This method returns and enumeration of the system list. |
static SystemBase |
get(SystemID idx)
This method returns the star system with the given ID. |
static SystemBase |
getRandomSystem()
This method returns a star system randomly selected from the list. |
static SystemID |
getRandomSystemID()
This method returns the ID of a star system randomly selected from the list. |
static VectorSystemID |
getRandomSystemIDs(int n)
This method returns a list of distinct IDs of a star system randomly selected from the list. |
(package private) static void |
readObject(java.io.ObjectInputStream in)
This method adds the star systems stored in the given stream (via an earlier call to writeObject) to the master list. |
static int |
size()
This method returns the number of star systems currently in the master list. |
(package private) static void |
writeObject(java.io.ObjectOutputStream out)
This method appends the current contents of the system list to the given output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static DBList DB
Constructor Detail |
private SystemList()
Method Detail |
static void add(SystemBase obj)
obj
- The new star system to be added to the master list.public static SystemBase get(SystemID idx)
idx
- The unique ID of the desired star system.public static int size()
static void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
out
- The output stream to which a copy of the
current system list is to be written.
java.io.IOException
static void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public static java.util.Enumeration elements()
public static SystemID getRandomSystemID()
getRandomSystem
public static SystemBase getRandomSystem()
getRandomSystemID
public static VectorSystemID getRandomSystemIDs(int n)
n
- The number distinct system IDs desired.getRandomSystemID
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |