com.miginfocom.util.filter
Class ExpressionFilter

java.lang.Object
  extended by com.miginfocom.util.filter.ExpressionFilter
All Implemented Interfaces:
Filter, java.io.Serializable

public class ExpressionFilter
extends java.lang.Object
implements Filter

A Filter that filters on the evaluation of an Expression.

For instance to filter on a property of a category (here if it is showing):

 new LogicalExpression(Category.PROP_IS_HIDDEN, LogicalExpression.NOT_EQUALS, Boolean.TRUE);
 

See Also:
Serialized Form

Constructor Summary
ExpressionFilter(java.lang.String name, Expression expr)
          Constructor.
 
Method Summary
 boolean accept(java.lang.Object propertyProvider)
          Do an evaluation on the PropertyProvider and returns it.
 Expression getExpression()
          Returns the expression.
 java.lang.String getName()
          Returns a human readable name for the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionFilter

public ExpressionFilter(java.lang.String name,
                        Expression expr)
Constructor.

Parameters:
expr - The expression that will be given a PropertyProvider to be evaluated. Not null.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Filter
Returns a human readable name for the filter.

Specified by:
getName in interface Filter
Returns:
A human readable name for the filter.

getExpression

public Expression getExpression()
Returns the expression.

Returns:
The expression.

accept

public final boolean accept(java.lang.Object propertyProvider)
Do an evaluation on the PropertyProvider and returns it.

Specified by:
accept in interface Filter
Parameters:
propertyProvider - The PropertyProvider that will be evaluated.
Returns:
If it's accepted


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.