org.apache.avalon.util.criteria
Class Criteria

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.apache.avalon.util.criteria.Criteria
All Implemented Interfaces:
Cloneable, Map, Serializable

public class Criteria
extends HashMap

A abstract utility class that can be used to simplify the creation of domain specific criteria.

Version:
$Revision: 1.1.1.1 $
Author:
Stephen McConnell
See Also:
Serialized Form

Constructor Summary
Criteria(Parameter[] params)
          Creation of a new criteria instance.
 
Method Summary
 Object get(Object key)
          Return the currently assigned value for a key.
protected  Parameter getParameter(String key)
           
protected  Parameter[] getParameters()
          Return the parameter associated to the criteria.
protected  Object getValue(Parameter param)
          Return the currently assigned value for a key.
 Object put(Object key, Object value)
          Set a named parameter of the criteria to a value.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

Criteria

public Criteria(Parameter[] params)
Creation of a new criteria instance.

Parameters:
params - the set of parameters managed by the criteria
Method Detail

put

public Object put(Object key,
                  Object value)
Set a named parameter of the criteria to a value.

Parameters:
key - the parameter key
value - the value to assign to the key
Returns:
the original value
Throws:
CriteriaRuntimeException - if the supplied value fails the validation test for its associated parameter

get

public Object get(Object key)
Return the currently assigned value for a key.

Returns:
the assigned value

getValue

protected Object getValue(Parameter param)
Return the currently assigned value for a key.

Returns:
the assigned value

getParameters

protected Parameter[] getParameters()
Return the parameter associated to the criteria.

Returns:
the parameters

getParameter

protected Parameter getParameter(String key)


Copyright © Apache Software Foundation. All Rights Reserved.