com.cometway.props
Interface IPropsContainer

All Known Implementing Classes:
AbstractPropsContainer, CookiePropsContainer, FilePropsContainer, JDBCPropsContainer, PropsContainer, ReadOnlyPropsContainer, ReflectionPropsContainer, VectorPropsContainer

public interface IPropsContainer

A class can implement IPropsContainer when it wants to implement a properties storage mechanism.


Method Summary
 void copy(IPropsContainer ipc)
          copy the properties in the current container to another container
 java.util.Enumeration enumerateProps()
          list the properties in the current container
 java.lang.Object getProperty(java.lang.String key)
          Returns a reference to a named object.
 boolean removeProperty(java.lang.String key)
          Removes a named object from the container.
 void setProperty(java.lang.String key, java.lang.Object value)
          Adds or changes a named object to the one specified.
 

Method Detail

getProperty

java.lang.Object getProperty(java.lang.String key)
Returns a reference to a named object.

Parameters:
key - the name of the object to retrieve.
Returns:
an object reference.

removeProperty

boolean removeProperty(java.lang.String key)
Removes a named object from the container.

Parameters:
key - the name of the object to remove.
Returns:
true if the object existed and was removed; false otherwise.

setProperty

void setProperty(java.lang.String key,
                 java.lang.Object value)
Adds or changes a named object to the one specified.

Parameters:
key - the name of the object to add or change.
value - a reference to the new object.

copy

void copy(IPropsContainer ipc)
copy the properties in the current container to another container

Parameters:
ipc - the container to be copied into.

enumerateProps

java.util.Enumeration enumerateProps()
list the properties in the current container

Returns:
an Enumeration of keys