|
|||||||||
Home >> All >> jpicedt >> graphic >> io >> [ parser overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
jpicedt.graphic.io.parser
Class AlternateExpression

java.lang.Objectjpicedt.graphic.io.parser.AbstractRegularExpression
jpicedt.graphic.io.parser.AlternateExpression
- All Implemented Interfaces:
- ExpressionConstants
- Direct Known Subclasses:
- RootExpression
- public class AlternateExpression
- extends AbstractRegularExpression
A regular expression that mimics the "x|y" RegExp syntax.
Field Summary | |
private java.util.ArrayList |
expressionList
|
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 | |
AlternateExpression()
Creates a new AlternateExpression with no element |
|
AlternateExpression(AbstractRegularExpression expr)
Creates a new AlternateExpression with the given expr as first element |
|
AlternateExpression(AbstractRegularExpression expr1,
AbstractRegularExpression expr2)
Creates a new AlternateExpression with the given expr as first and second element |
|
AlternateExpression(AbstractRegularExpression expr1,
AbstractRegularExpression expr2,
AbstractRegularExpression expr3)
Creates a new AlternateExpression with the given expr as first, second and third element |
Method Summary | |
void |
add(AbstractRegularExpression expr)
Add a new child to this AlternateExpression. |
java.util.ArrayList |
getExpressionList()
Return a list containing every expression in this AlternateExpression |
boolean |
interpret(Context c)
Calls "action" with value=Integer(index of first expression parsed with success, starting from 0). |
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 |
expressionList
private java.util.ArrayList expressionList
Constructor Detail |
AlternateExpression
public AlternateExpression(AbstractRegularExpression expr)
- Creates a new AlternateExpression with the given expr as first element
AlternateExpression
public AlternateExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2)
- Creates a new AlternateExpression with the given expr as first and second element
AlternateExpression
public AlternateExpression(AbstractRegularExpression expr1, AbstractRegularExpression expr2, AbstractRegularExpression expr3)
- Creates a new AlternateExpression with the given expr as first, second and third element
AlternateExpression
public AlternateExpression()
- Creates a new AlternateExpression with no element
Method Detail |
add
public void add(AbstractRegularExpression expr)
- Add a new child to this AlternateExpression.
interpret
public boolean interpret(Context c) throws ParserException
- Calls "action" with value=Integer(index of first expression parsed with success,
starting from 0).
- Specified by:
interpret
in classAbstractRegularExpression
getExpressionList
public java.util.ArrayList getExpressionList()
- Return a list containing every expression in this AlternateExpression
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())
.
|
|||||||||
Home >> All >> jpicedt >> graphic >> io >> [ parser overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |