|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hagenah.diplomacy.game.GameGroup
de.hagenah.diplomacy.diptool.DipGameGroup
public class DipGameGroup
A group of games. Note: This class is not thread-safe. So even if some methods may be called by other threads than the event dispatching thread it's still so that in this case the event-dispatching thread must not modify this object in parallel.
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
Compares two groups by Name |
Game |
createGame(java.lang.String name,
java.lang.String judge,
java.lang.String map)
Retrieves the specified game. |
protected MapData |
createMap(java.lang.String name)
Retrieves the specified map. |
boolean |
equals(java.lang.Object obj)
Compares two groups by Name |
int |
hashCode()
Returns a hashcode for this group. |
protected Game |
internCreateGame(java.lang.String name,
java.lang.String judge,
MapData map)
Creates a Game object |
java.util.Collection |
parse(java.io.Reader reader)
Parses a text. |
java.util.Collection |
read(java.util.Collection files,
boolean always,
de.hagenah.util.ModalProgressMonitor progressmonitor)
Reads files and directories (recursive). |
void |
readAllAgain()
All files are read again if ScanDirectories is processed the next time. |
void |
removeGame(java.lang.String name,
java.lang.String judge)
Removes the game |
void |
renameGame(java.lang.String oldname,
java.lang.String oldjudge,
java.lang.String newname,
java.lang.String newjudge)
Renames a game |
java.util.Collection |
scan(de.hagenah.util.ModalProgressMonitor progressmonitor)
Scans all directories (recursive) and files. |
java.util.Collection |
scan(java.util.SortedSet paths)
Scans only the directories (recursive) and files that are in paths and ScanDirectories. |
java.lang.String |
toString()
Returns the name of the group, e.g. |
| Methods inherited from class de.hagenah.diplomacy.game.GameGroup |
|---|
getGame, getGameIndex, getGames, getMapPath, getMapURL, processGames, setMapPath |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
protected Game internCreateGame(java.lang.String name,
java.lang.String judge,
MapData map)
internCreateGame in class GameGroup
public Game createGame(java.lang.String name,
java.lang.String judge,
java.lang.String map)
throws java.lang.Exception
createGame in interface GameHandlercreateGame in class GameGroupname - The name of the game (!=null).judge - The name of the judge (!=null).map - The name of the map.
java.lang.Exception
protected MapData createMap(java.lang.String name)
throws java.lang.Exception
createMap in class GameGroupjava.lang.Exception
public void removeGame(java.lang.String name,
java.lang.String judge)
removeGame in class GameGroup
public void renameGame(java.lang.String oldname,
java.lang.String oldjudge,
java.lang.String newname,
java.lang.String newjudge)
renameGame in class GameGrouppublic void readAllAgain()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public java.util.Collection read(java.util.Collection files,
boolean always,
de.hagenah.util.ModalProgressMonitor progressmonitor)
files - The files and directories to read (File objects)always - false if already read files shall be skipped, true if a file shall be
read even if it was already readprogressmonitor - A progress monitor (can be null)
public java.util.Collection scan(de.hagenah.util.ModalProgressMonitor progressmonitor)
progressmonitor - A progress monitor (can be null)public java.util.Collection scan(java.util.SortedSet paths)
paths - The set with the directories and files (String) to scan. The paths
must be canonical and the set must use the natural order.public java.util.Collection parse(java.io.Reader reader)
reader - The reader with the text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||