|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.config.ConfigGroup<T>
public class ConfigGroup<T extends ManagedConfig>
Contains a group of managed configurations, all of the same class.
| Constructor Summary | |
|---|---|
ConfigGroup()
No-arg constructor for deserialization. |
|
ConfigGroup(Class<T> clazz)
Creates a new config group for the specified class. |
|
| Method Summary | |
|---|---|
void |
addConfig(T config)
Adds a configuration to the set. |
void |
addConfigs(Collection<T> configs)
Adds all of the supplied configurations to the set. |
void |
addListener(ConfigGroupListener<T> listener)
Adds a listener for configuration events. |
Object |
copy(Object dest)
Creates a copy of this object, (re)populating the supplied destination object if possible. |
Object |
copy(Object dest,
Object outer)
Creates a copy of this object, (re)populating the supplied destination object if possible. |
T |
getConfig(String name)
Retrieves a configuration by name. |
Class<T> |
getConfigClass()
Returns the class of the configurations in this group. |
Collection<T> |
getConfigs()
Returns the collection of all registered configurations. |
String |
getName()
Returns the name of this group. |
static String |
getName(Class<?> clazz)
Returns the group name for the specified config class. |
void |
init(ConfigManager cfgmgr)
Initializes this group. |
void |
load(File file)
Loads the configurations from the specified file. |
void |
load(File file,
boolean merge)
Loads the configurations from the specified file. |
void |
readFields(Importer in)
Reads the fields of this object. |
void |
removeConfig(T config)
Removes a configuration from the set. |
void |
removeListener(ConfigGroupListener<T> listener)
Removes a configuration event listener. |
void |
revert()
Reverts to the last saved configurations. |
void |
save()
Saves this group's configurations. |
void |
save(Collection<T> configs,
File file)
Saves the provided collection of configurations to a file. |
void |
save(File file)
Saves this group's configurations to the specified file. |
void |
writeFields(Exporter out)
Writes the fields of this object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigGroup(Class<T> clazz)
public ConfigGroup()
| Method Detail |
|---|
public static String getName(Class<?> clazz)
public void init(ConfigManager cfgmgr)
public String getName()
public Class<T> getConfigClass()
public T getConfig(String name)
public Collection<T> getConfigs()
public void addListener(ConfigGroupListener<T> listener)
public void removeListener(ConfigGroupListener<T> listener)
public void addConfigs(Collection<T> configs)
public void addConfig(T config)
public void removeConfig(T config)
public void save()
public void save(File file)
public void save(Collection<T> configs,
File file)
public void revert()
public void load(File file)
public void load(File file,
boolean merge)
merge - if true, merge with the existing configurations; do not delete configurations
that do not exist in the file.
public void writeFields(Exporter out)
throws IOException
IOException
public void readFields(Importer in)
throws IOException
IOExceptionpublic Object copy(Object dest)
Copyable
copy in interface Copyable
public Object copy(Object dest,
Object outer)
Copyable
copy in interface Copyableouter - the outer object reference to use for inner object creation, if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||