Jadex 0.96-beta1

jadex.runtime
Class ComposedFilter

java.lang.Object
  extended by jadex.runtime.ComposedFilter
All Implemented Interfaces:
IFilter, jadex.runtime.impl.IEncodable, Serializable

public class ComposedFilter
extends Object
implements IFilter, jadex.runtime.impl.IEncodable, Serializable

A filter checks if an object matches the given subfilters.

See Also:
Serialized Form

Field Summary
static int AND
          The AND operator.
static int NOT
          The NOT operator.
static int OR
          The OR operator.
 
Fields inherited from interface jadex.runtime.IFilter
ALWAYS, NEVER
 
Constructor Summary
ComposedFilter(IFilter[] filters, int operator)
          Create a composed filter.
 
Method Summary
 boolean filter(Object object)
          Match an object against the filter.
 Map getEncodableRepresentation()
          Get the encodable representation.
static String operatorToString(int operator)
          Create a string representation of the operator.
 String toString()
          Create a string representation of this filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AND

public static final int AND
The AND operator.

See Also:
Constant Field Values

OR

public static final int OR
The OR operator.

See Also:
Constant Field Values

NOT

public static final int NOT
The NOT operator.

See Also:
Constant Field Values
Constructor Detail

ComposedFilter

public ComposedFilter(IFilter[] filters,
                      int operator)
Create a composed filter.

Parameters:
filters - The filters.
operator - The operator.
Method Detail

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.

operatorToString

public static String operatorToString(int operator)
Create a string representation of the operator.

Returns:
A string representing the operator.

getEncodableRepresentation

public Map getEncodableRepresentation()
Get the encodable representation.

Specified by:
getEncodableRepresentation in interface jadex.runtime.impl.IEncodable

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.