Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.graphic.io.parser
Class StatementExpression  view StatementExpression download StatementExpression.java

java.lang.Object
  extended byjpicedt.graphic.io.parser.AbstractRegularExpression
      extended byjpicedt.graphic.io.parser.StatementExpression
All Implemented Interfaces:
ExpressionConstants

public class StatementExpression
extends AbstractRegularExpression

An expression for "statement"-parsing, i.e. a name followed by an assignment sign followed by a numerical value e.g. "dash=4.0" or "thickness->8"


Field Summary
private  java.lang.String as
           
private  AbstractRegularExpression exp1
           
private  AbstractRegularExpression exp2
           
private  AbstractRegularExpression exp3
           
private  java.lang.String lhs
           
private  java.lang.String pf
           
private  java.lang.Number value
           
 
Fields inherited from interface jpicedt.graphic.io.parser.ExpressionConstants
ANY_CHAR, ANY_CHAR_EOL, ANY_SIGN, AT_LEAST, AT_MOST, DEBUG, DOUBLE, EOL, EXACTLY, INTEGER, NEGATIVE, NON_NULL, POSITIVE, STRICTLY_NEGATIVE, STRICTLY_POSITIVE, WHITE_SPACES, WHITE_SPACES_OR_EOL
 
Constructor Summary
StatementExpression(java.lang.String leftHandSide, java.lang.String equalSymbol, java.lang.String postfix, int type, int sign)
           
 
Method Summary
 java.lang.Number getValue()
          Return the value of the RHS, wrapped in a Number (either Integer or Double)
 boolean interpret(Context c)
          Parses this expression, possibly using Context to fetch the String to interpret if this Expression is a leaf expression.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class jpicedt.graphic.io.parser.AbstractRegularExpression
action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private java.lang.Number value

lhs

private java.lang.String lhs

as

private java.lang.String as

pf

private java.lang.String pf

exp1

private AbstractRegularExpression exp1

exp2

private AbstractRegularExpression exp2

exp3

private AbstractRegularExpression exp3
Constructor Detail

StatementExpression

public StatementExpression(java.lang.String leftHandSide,
                           java.lang.String equalSymbol,
                           java.lang.String postfix,
                           int type,
                           int sign)
Method Detail

interpret

public boolean interpret(Context c)
                  throws ParserException
Description copied from class: AbstractRegularExpression
Parses this expression, possibly using Context to fetch the String to interpret if this Expression is a leaf expression.

Specified by:
interpret in class AbstractRegularExpression

getValue

public java.lang.Number getValue()
Return the value of the RHS, wrapped in a Number (either Integer or Double)


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).