public interface PropertySet extends PropertyChangeEmitter
The PropertySet interface is based on the well-known Property List design pattern.
Property| Modifier and Type | Method and Description |
|---|---|
void |
addProperties(Property... properties)
Adds the given properties to this set.
|
void |
addProperty(Property property)
Adds a property to this set.
|
PropertyDescriptor |
getDescriptor(String name)
Gets the descriptor for the named property.
|
Property[] |
getProperties()
Gets all properties currently contained in this set.
|
Property |
getProperty(String name)
Gets the named property.
|
<T> T |
getValue(String name)
Gets the value of the named property.
|
boolean |
isPropertyDefined(String name)
Tests if the named property is defined in this set.
|
void |
removeProperties(Property... properties)
Removes the given properties from this set.
|
void |
removeProperty(Property property)
Removes a property from this set.
|
void |
setDefaultValues()
Sets all properties to their default values.
|
void |
setValue(String name,
Object value)
Sets the value of the named property.
|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerProperty[] getProperties()
boolean isPropertyDefined(String name)
getProperty(name) will
always return null.name - The property name or the property's alias name (both case sensitive).true if the property is defined.Property getProperty(String name)
name - The property name or the property's alias name (both case sensitive).null if the property does not exist.isPropertyDefined(String),
PropertyDescriptor.getAlias()void addProperty(Property property)
property - The property.void addProperties(Property... properties)
properties - The properties to be added.void removeProperty(Property property)
property - The property.void removeProperties(Property... properties)
properties - The properties to be removed.<T> T getValue(String name) throws ClassCastException
name - The property name.null if a property with the given name does not exist.ClassCastException - if the value is not of the requested type.void setValue(String name, Object value) throws IllegalArgumentException
name - The property name.value - The new property value.IllegalArgumentException - If the value is illegal.
The cause will always be a ValidationException.void setDefaultValues()
throws IllegalStateException
IllegalStateException - If at least one of the default values is illegal.
The cause will always be a ValidationException.PropertyDescriptor.getDefaultValue()PropertyDescriptor getDescriptor(String name)
name - The property name (case sensitive).null if the property is unknown.Copyright © 2014–2015 European Space Agency (ESA). All rights reserved.