org.xins.common.collections
Class StatsPropertyReader

java.lang.Object
  extended byorg.xins.common.collections.StatsPropertyReader
All Implemented Interfaces:
PropertyReader, Serializable

public final class StatsPropertyReader
extends Object
implements PropertyReader

Immutable property reader that remembers which properties have not been accessed.

Since:
XINS 1.3.0
Version:
$Revision: 1.6 $ $Date: 2006/08/28 09:12:32 $
Author:
Ernst de Haan
See Also:
Serialized Form

Constructor Summary
StatsPropertyReader(PropertyReader source)
          Constructs a new StatsPropertyReader based on the specified PropertyReader.
 
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.
 PropertyReader getUnused()
          Retrieves the set of unused properties.
 int size()
          Returns the number of entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatsPropertyReader

public StatsPropertyReader(PropertyReader source)
                    throws IllegalArgumentException
Constructs a new StatsPropertyReader based on the specified PropertyReader. The properties in source are copied to an internal store.

Parameters:
source - the source property reader, cannot be null.
Throws:
IllegalArgumentException - if source == null.
Method Detail

get

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

Specified by:
get in interface PropertyReader
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.

Specified by:
getNames in interface PropertyReader
Returns:
the Iterator that will iterate over all the names, never null.

size

public int size()
Returns the number of entries.

Specified by:
size in interface PropertyReader
Returns:
the size, always >= 0.

getUnused

public PropertyReader getUnused()
Retrieves the set of unused properties.

Returns:
a PropertyReader containing which were not queried, never null.


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