uk.me.parabola.mkgmap.osmstyle.eval
Class OpenOp

java.lang.Object
  extended by uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp
      extended by uk.me.parabola.mkgmap.osmstyle.eval.OpenOp
All Implemented Interfaces:
Op

public class OpenOp
extends AbstractOp

An open parenthesis. This is treated specially.

Author:
Steve Ratcliffe

Field Summary
 
Fields inherited from class uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp
first
 
Fields inherited from interface uk.me.parabola.mkgmap.osmstyle.eval.Op
AND, CLOSE_PAREN, EQUALS, EXISTS, GT, GTE, LT, LTE, NOT, NOT_EQUALS, NOT_EXISTS, OPEN_PAREN, OR, REGEX, VALUE
 
Constructor Summary
OpenOp()
           
 
Method Summary
 boolean eval(Element el)
          Evaluate the expression.
 boolean hasHigherPriority(Op other)
          This is called when it is on the top of the stack.
 int priority()
          This is used when placing this on the top of the stack, for that purpose it has a very high priority and will not cause anything below to execute.
 
Methods inherited from class uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp
createOp, getFirst, getType, isType, setFirst, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenOp

public OpenOp()
Method Detail

eval

public boolean eval(Element el)
Description copied from interface: Op
Evaluate the expression.

Parameters:
el - The OSM element to be tested.
Returns:
True if the expression is true for the given element.

priority

public int priority()
This is used when placing this on the top of the stack, for that purpose it has a very high priority and will not cause anything below to execute.


hasHigherPriority

public boolean hasHigherPriority(Op other)
This is called when it is on the top of the stack. In this case all other operations have a higher priority.

Specified by:
hasHigherPriority in interface Op
Overrides:
hasHigherPriority in class AbstractOp
Parameters:
other - The other operation.
Returns:
Always returns false.