|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.jape.KleeneOperator
public class KleeneOperator
Representation of Kleene operators on expressions. Kleene operators indicate the number of repetitions over an expression that are legal. The most common are star (0 or more), plus (1 or more), and optional (0 or 1, also referred to as "kleene query"). The class can also represent a range with a fixed minimum, maximum, or both. Finally, a default type of single (exactly 1) is also defined.
Nested Class Summary | |
---|---|
static class |
KleeneOperator.Type
Enum containing the defined types of operators. |
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
log
|
Constructor Summary | |
---|---|
KleeneOperator(Integer val)
Create an operator with type RANGE and min and max both set to val. |
|
KleeneOperator(Integer min,
Integer max)
Create an operator with type RANGE and the given min and max. |
|
KleeneOperator(KleeneOperator.Type type)
Create an operator with the given type, setting the appropriate min for each (and max when defined). |
Method Summary | |
---|---|
Integer |
getMax()
|
Integer |
getMin()
|
KleeneOperator.Type |
getType()
|
void |
setType(KleeneOperator.Type type)
|
String |
toString()
The string representation for most operators is the operator symbol itself. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger log
Constructor Detail |
---|
public KleeneOperator(KleeneOperator.Type type)
KleeneOperator.Type.RANGE
operators. Use one of
the other range-defining constructors in that case.
type
- public KleeneOperator(Integer val)
val
- public KleeneOperator(Integer min, Integer max)
min
- max
- Method Detail |
---|
public String toString()
toString
in class Object
public KleeneOperator.Type getType()
public void setType(KleeneOperator.Type type)
public Integer getMin()
public Integer getMax()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |