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

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

public class ValueOp
extends AbstractOp

Holds a string value; the name of a tag or the value of a tag for example.

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
ValueOp(java.lang.String value)
           
 
Method Summary
 boolean eval(Element el)
          Evaluate the expression.
 boolean isValue(java.lang.String val)
           
 int priority()
           
 java.lang.String toString()
           
 java.lang.String value()
          Get the value in a 'pure' form, without being quoted in any way.
 
Methods inherited from class uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp
createOp, getFirst, getType, hasHigherPriority, isType, setFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueOp

public ValueOp(java.lang.String value)
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()

value

public java.lang.String value()
Description copied from interface: Op
Get the value in a 'pure' form, without being quoted in any way. If you want the expression in a form that can be printed and used in a style file, then use toString().

Specified by:
value in interface Op
Overrides:
value in class AbstractOp

isValue

public boolean isValue(java.lang.String val)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object