|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.nxg.unity.UnitDefinitionMap
public class UnitDefinitionMap
Provides a mapping from unit abbreviations to unit definitions.
This is a singleton class, so clients must first obtain the
instance of the class using getInstance()
.
Method Summary | |
---|---|
static UnitDefinitionMap |
getInstance()
Obtain an instance of the unit-definition map. |
Set<String> |
keySet()
Obtains all of the unit abbreviations known to this map. |
UnitDefinition |
lookup(String k)
Looks up the unit which corresponds to a unit abbreviation |
static void |
persist(Map<String,UnitDefinition> m,
File persistenceFile)
Persist a mapping of unit abbreviations to unit definitions. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void persist(Map<String,UnitDefinition> m, File persistenceFile) throws IOException
This method is public, but is not not expected to be used by clients; it is used only when building this package. FIXME: this is a poor design, and should be fixed when possible.
IOException
public static UnitDefinitionMap getInstance()
public UnitDefinition lookup(String k)
public Set<String> keySet()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |