public class RegExpPower extends RegExpOne
BINARY_EXP, CHOICE_EXP, CONCAT_EXP, EMPTY, EMPTY_EXP, OPTION_EXP, PLUS_EXP, POWER_EXP, RANGE_EXP, STAR_EXP, SYMBOL_EXP, UNARY_EXP| Constructor and Description |
|---|
RegExpPower(RegExp arg,
int power)
Constructs a RegExpPower with the specified
RegExp an int.
|
| Modifier and Type | Method and Description |
|---|---|
RegExp |
deepCopy()
This returns a deep copy of this RegExp.
|
boolean |
equals(java.lang.Object other)
Returns true iff the specified object is a
RegExpPower that has the same argument and power as this
one.
|
int |
getPower() |
RegExp |
normalize()
This returns this RegExpPower's
normal form according to the following rewrite rules:
[PW:E]
()^n
→
()
[PW:0]
X^n
→
()
(if n≤0)
[PW:1]
X^1
→
X
[PW:O]
X?^n
→
X_0^n
[PW:P]
X+^n
→
X_n~
[PW:S]
X\*^n
→
X\*
[PW:N]
X^m^n
→
X^m×n
[PW:R]
X_m^n^p
→
X_m×p^n×p
|
RegExpPower |
setPower(int power) |
RegExp |
shallowCopy()
This returns a shallow copy of this RegExp.
|
java.lang.String |
toString()
Returns a printable form for this RegExpPower.
|
int |
type()
This returns the specific type identifying this RegExp.
|
public RegExpPower(RegExp arg, int power)
public final int getPower()
public final RegExp shallowCopy()
RegExpshallowCopy in class RegExppublic final RegExp deepCopy()
RegExppublic final int type()
RegExppublic final RegExpPower setPower(int power)
public RegExp normalize()
public final boolean equals(java.lang.Object other)
public final java.lang.String toString()
toString in class java.lang.Object