ca.nengo.config.impl
Class ConfigurationImpl
java.lang.Object
ca.nengo.config.impl.ConfigurationImpl
- All Implemented Interfaces:
- Configuration
public class ConfigurationImpl
- extends java.lang.Object
- implements Configuration
Default implementation of Configuration. This implementation reports property names in
the order they are defined.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationImpl
public ConfigurationImpl(java.lang.Object configurable)
- Parameters:
configurable
- The Object to which this Configuration belongs
getConfigurable
public java.lang.Object getConfigurable()
- Specified by:
getConfigurable
in interface Configuration
- Returns:
- The Object to which this Configuration belongs
- See Also:
Configuration.getConfigurable()
defineProperty
public void defineProperty(Property property)
- To be called by the associated Configurable, immediately after construction (once
per property).
- Parameters:
property
- The new Property
removeProperty
public void removeProperty(java.lang.String name)
- Parameters:
name
- Property to remove
renameProperty
public void renameProperty(java.lang.String oldName,
java.lang.String newName)
- Parameters:
oldName
- The existing name of the PropertynewName
- The replacement name of the Property
defineSingleValuedProperty
public SingleValuedPropertyImpl defineSingleValuedProperty(java.lang.String name,
java.lang.Class<?> c,
boolean mutable)
- Parameters:
name
- Property to be definedc
- Class on which the property is definedmutable
- Mutable?
- Returns:
- SingleValuedPropertyImpl
defineTemplateProperty
public TemplateProperty defineTemplateProperty(java.lang.String name,
java.lang.Class<?> c,
java.lang.Object defaultValue)
- Parameters:
name
- Property to be definedc
- Class on which the property is defineddefaultValue
- Default object
- Returns:
- TemplateProperty
getPropertyNames
public java.util.List<java.lang.String> getPropertyNames()
- Specified by:
getPropertyNames
in interface Configuration
- Returns:
- Names of configuration properties
- See Also:
Configuration.getPropertyNames()
getProperty
public Property getProperty(java.lang.String name)
throws StructuralException
- Specified by:
getProperty
in interface Configuration
- Parameters:
name
- Name of a configuration property
- Returns:
- Parameter of the given name
- Throws:
StructuralException
- if the named property does not exist- See Also:
Configuration.getProperty(java.lang.String)