org.xins.common.collections
Interface PropertyReader

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractPropertyReader, ServletConfigPropertyReader, StatsPropertyReader

public interface PropertyReader
extends Serializable

Property reader. Object that implement this interface allow read-only access to a set of property entries. Each entry consists of a name and a value. Both are String objects.

Some implementations of this interface also support changing the underlying set of property entries. In this case, setting a property value to null has the same effect as removing the property altogether.

Since:
XINS 1.0.0
Version:
$Revision: 1.17 $ $Date: 2008/07/04 10:22:49 $
Author:
Ernst de Haan
See Also:
PropertyReaderUtils

Method Summary
 String get(String name)
          Gets the value of the property with the specified name.
 Iterator getNames()
          Gets an iterator that iterates over all the property names.
 int size()
          Returns the number of entries.
 

Method Detail

get

public String get(String name)
           throws IllegalArgumentException
Gets the value of the property with the specified name.

Parameters:
name - the name of the property, cannot be null.
Returns:
the value of the property, or null if it is not set.
Throws:
IllegalArgumentException - if name == null.

getNames

public Iterator getNames()
Gets an iterator that iterates over all the property names. The Iterator will return only String instances.

Returns:
the Iterator that will iterate over all the names, never null.

size

public int size()
Returns the number of entries.

Returns:
the size, always >= 0.


See http://www.xins.org/.