Class AndExpression

  extended by com.miginfocom.util.expression.CompositeExpression
      extended by com.miginfocom.util.expression.AndExpression
All Implemented Interfaces:

public final class AndExpression
extends CompositeExpression

A composite expression that AND:s the expressions and returns the result.

See Also:
Serialized Form

Field Summary
Fields inherited from class com.miginfocom.util.expression.CompositeExpression
expression1, expression2
Constructor Summary
AndExpression(Expression expression1, Expression expression2)
Method Summary
 boolean evaluate(PropertyProvider provider)
          Returns whether the expression validates to true.
Methods inherited from class com.miginfocom.util.expression.CompositeExpression
equals, getExpression1, getExpression2
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AndExpression(Expression expression1,
                     Expression expression2)

expression1 - The first expression.
expression2 - The second expression. Only evaluated if expression1 is true.
Method Detail


public boolean evaluate(PropertyProvider provider)
Description copied from interface: Expression
Returns whether the expression validates to true.

provider - The object that is to give the value for the property name. It's PropertyProvider.getProperty(com.miginfocom.util.PropertyKey) will be called with propName.

Note! This "callback" object is only in a valid state to get the property during this method call.

Subclasses may disregard this object altogether to have some arbitrary evaluation logic.

If the propNameValue evaluates to true depending on operation and propValue.

Copyright © 2009 MiG InfoCom AB. All Rights Reserved.