Package jadex.tools.comanalyzer
Class ParameterElementFilter
- java.lang.Object
-
- jadex.tools.comanalyzer.ParameterElementFilter
-
- All Implemented Interfaces:
IFilter
,java.io.Serializable
- Direct Known Subclasses:
ComponentFilter
,MessageFilter
public class ParameterElementFilter extends java.lang.Object implements IFilter, java.io.Serializable
The parameter element filter filters ParameterElement 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 Modifier and Type Field Description protected MultiCollection<java.lang.String,java.lang.Object>
values
The required attribute values.
-
Constructor Summary
Constructors Constructor Description ParameterElementFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(java.lang.String name, java.lang.Object value)
Add a required attribute value.boolean
containsValue(java.lang.String name, java.lang.Object value)
Returns true if the filter contains the given attribute value.boolean
filter(java.lang.Object object)
Match an object against the filter.boolean
hasValues()
void
removeValue(java.lang.String name, java.lang.Object value)
Removes an attribute value.java.lang.String
toString()
Create a string representation of this filter.
-
-
-
Field Detail
-
values
protected MultiCollection<java.lang.String,java.lang.Object> values
The required attribute values.
-
-
Method Detail
-
addValue
public void addValue(java.lang.String name, java.lang.Object value)
Add a required attribute value. The attribute value is checked with equals().- Parameters:
name
- The attribute name.value
- The attribute value.
-
removeValue
public void removeValue(java.lang.String name, java.lang.Object value)
Removes an attribute value.- Parameters:
name
- The attribute name.value
- The attribute value.
-
containsValue
public boolean containsValue(java.lang.String name, java.lang.Object value)
Returns true if the filter contains the given attribute value.- Parameters:
name
- The attribute name.value
- The attribute value.- Returns:
- true if the filter contains the given attribute value.
-
hasValues
public boolean hasValues()
- Returns:
true
if the filter has values.
-
filter
public boolean filter(java.lang.Object object)
Match an object against the filter.
-
toString
public java.lang.String toString()
Create a string representation of this filter.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representing this filter.
-
-