|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.parser.ObjectOperationPair
Pair class used by AbstractParser
to store a value and an associated operation.
The value is viewed as the left operand of the
operation and the operation is viewed as pending
the acquisition of its right operand.
The operation may be null to
signal that no more operations have been found
to process in the current parsing phase.
If the operation is non-null and
can accept null as a left operand
then the value may be null.
As of 2.5.0, this class was extracted from the class
AbstractParser and made standalone.
| Field Summary | |
private Operation |
operation
The operation component of the pair. |
private Object |
value
The object component of the pair. |
| Constructor Summary | |
ObjectOperationPair()
Constructs a default initial ObjectOperationPair
whose value is null
and whose Operation
is Operation.IDENTITY. |
|
ObjectOperationPair(Object v,
Operation o)
Constructs a pair with the given value and operation. |
|
| Method Summary | |
Operation |
operation()
Returns the operation component of this pair. |
Object |
value()
Returns the value component of this pair. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Object value
private Operation operation
| Constructor Detail |
public ObjectOperationPair()
Constructs a default initial
ObjectOperationPair
whose value is null
and whose Operation
is Operation.IDENTITY.
Such a pair is used to start the
parse method in
BaseParser.
public ObjectOperationPair(Object v,
Operation o)
Constructs a pair with the given value and operation.
v - the value componento - the operation component| Method Detail |
public Object value()
public Operation operation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||