Jadex 0.96-beta1

jadex.runtime
Class ParameterElementFilter

java.lang.Object
  extended by jadex.runtime.ParameterElementFilter
All Implemented Interfaces:
IFilter, Serializable
Direct Known Subclasses:
GoalEventFilter, InternalEventFilter, MessageEventFilter

public abstract class ParameterElementFilter
extends Object
implements IFilter, Serializable

A parameter element filter filters objects based on their parameter values. Parameter values of elements can be matched against required values, or recursively against other filters. When more than one value and / or filter is specified for an attribute, only one of those has to match.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface jadex.runtime.IFilter
ALWAYS, NEVER
 
Constructor Summary
ParameterElementFilter()
          Create an attribute filter.
 
Method Summary
 void addValue(String name, Object value)
          Add a required attribute value.
 boolean filter(Object object)
          Match an object against the filter.
 void setMatchExpression(IMExpression match)
          Add a match expression for a parameter/set.
 String toString()
          Create a string representation of this filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterElementFilter

public ParameterElementFilter()
Create an attribute filter.

Method Detail

addValue

public void addValue(String name,
                     Object value)
Add a required attribute value. The attribute value is checked with equals().

Parameters:
name - The attribute name.
value - The attribute value.

setMatchExpression

public void setMatchExpression(IMExpression match)
Add a match expression for a parameter/set.


filter

public boolean filter(Object object)
               throws Exception
Match an object against the filter.

Specified by:
filter in interface IFilter
Parameters:
object - The object.
Returns:
True, if the filter matches.
Throws:
Exception

toString

public String toString()
Create a string representation of this filter.

Overrides:
toString in class Object
Returns:
A string representing this filter.

Jadex 0.96-beta1

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.