Package diva.util
Class BasicPropertyContainer
- java.lang.Object
-
- diva.util.BasicPropertyContainer
-
- All Implemented Interfaces:
PropertyContainer
public class BasicPropertyContainer extends java.lang.Object implements PropertyContainer
An object that can be annotated with arbitrary objects whose keys are strings.- Version:
- $Id$
- Author:
- Michael Shilman
-
-
Constructor Summary
Constructors Constructor Description BasicPropertyContainer()A property container with no defaults.BasicPropertyContainer(PropertyContainer defaults)A property container with no defaults.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetProperty(java.lang.String key)Return the property corresponding to the given key, or null if no such property exists.java.util.Iteratorproperties()Return a Iterator.java.util.IteratorpropertyNames()Return an iteration of the names of the properties.voidremoveAllProperties()Remove all properties.voidsetProperty(java.lang.String key, java.lang.Object value)Set the property corresponding to the given key.
-
-
-
Constructor Detail
-
BasicPropertyContainer
public BasicPropertyContainer()
A property container with no defaults.
-
BasicPropertyContainer
public BasicPropertyContainer(PropertyContainer defaults)
A property container with no defaults.- Parameters:
defaults- The defaults.
-
-
Method Detail
-
getProperty
public java.lang.Object getProperty(java.lang.String key)
Return the property corresponding to the given key, or null if no such property exists.- Specified by:
getPropertyin interfacePropertyContainer- See Also:
setProperty(String, Object)
-
setProperty
public void setProperty(java.lang.String key, java.lang.Object value)Set the property corresponding to the given key.- Specified by:
setPropertyin interfacePropertyContainer- See Also:
getProperty(String)
-
removeAllProperties
public void removeAllProperties()
Remove all properties.
-
properties
public java.util.Iterator properties()
Return a Iterator.- Returns:
- An iterator.
-
propertyNames
public java.util.Iterator propertyNames()
Return an iteration of the names of the properties.- Specified by:
propertyNamesin interfacePropertyContainer- Returns:
- An iterator.
-
-