Class XorExpression

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

public final class XorExpression
extends CompositeExpression

A composite expression that XOR:s the expressions and returns the result. I.e. returns true if the expressions return different results.

See Also:
Serialized Form

Field Summary
Fields inherited from class com.miginfocom.util.expression.CompositeExpression
expression1, expression2
Constructor Summary
XorExpression(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 XorExpression(Expression expression1,
                     Expression expression2)

expression1 - The first expression.
expression2 - The second expression.
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.