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

java.lang.Object
  extended by uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp
All Implemented Interfaces:
Op
Direct Known Subclasses:
AbstractBinaryOp, CloseOp, ExistsOp, NotExistsOp, NotOp, OpenOp, ValueOp

public abstract class AbstractOp
extends java.lang.Object
implements Op

A base class that can be used as the superclass of an operation.

Author:
Steve Ratcliffe

Field Summary
protected  Op 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
AbstractOp()
           
 
Method Summary
static Op createOp(java.lang.String value)
           
 Op getFirst()
          Get the first operand.
 char getType()
           
 boolean hasHigherPriority(Op other)
          Does this operation have a higher priority that the other one?
 boolean isType(char value)
           
 void setFirst(Op first)
           
 java.lang.String value()
          Get the value in a 'pure' form, without being quoted in any way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.me.parabola.mkgmap.osmstyle.eval.Op
eval, priority
 

Field Detail

first

protected Op first
Constructor Detail

AbstractOp

public AbstractOp()
Method Detail

createOp

public static Op createOp(java.lang.String value)

hasHigherPriority

public boolean hasHigherPriority(Op other)
Does this operation have a higher priority that the other one?

Specified by:
hasHigherPriority in interface Op
Parameters:
other - The other operation.

getFirst

public Op getFirst()
Description copied from interface: Op
Get the first operand.

Specified by:
getFirst in interface Op

setFirst

public void setFirst(Op first)
Specified by:
setFirst in interface Op

getType

public char getType()
Specified by:
getType in interface Op

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

isType

public boolean isType(char value)
Specified by:
isType in interface Op