public abstract class CharClass extends AbstractQuantifiableSequenceableAlternative implements Expression, Quantifiable, Sequenceable, Alternative
Modifier and Type | Class and Description |
---|---|
static class |
CharClass.Java
Module containing predefined character classes matching character traits
defined by the
Character class. |
static class |
CharClass.Perl
Module containing Perl-style predefined character classes.
|
static class |
CharClass.Posix
Module containing POSIX-style predefined character classes.
|
static class |
CharClass.Unicode
Module containing predefined character classes matching a single
character that has certain traits defined by the Unicode specification.
|
Constructor and Description |
---|
CharClass() |
Modifier and Type | Method and Description |
---|---|
Integer |
boundedLength()
Indicates the computed maximum length of the expression, if one can be
determined.
|
static SingleChar |
character(char c)
Constructs a character class consisting of a single character.
|
static MultiChar |
characters(char c1,
char c2,
char... cs)
Constructs a character class consisting of several characters.
|
fj.data.LazyString |
expression()
Returns the regular expression represented by this object.
|
Intersection |
intersect(CharClass right)
Returns the intersection of this character class with the
specified character class.
|
Intersection |
intersect(Intersection right)
Returns the intersection of this character class with the
specified character classes.
|
abstract CharClass |
negated()
Returns an expressing matching a single character that is not within
the class of characters matched by this expression.
|
boolean |
possiblyZeroLength()
Indicates whether the expression may possibly be zero length.
|
static CharRange |
range(char first,
char last)
Constructs a character class consisting of all characters in
a range.
|
boolean |
repetitionInvalidatesBounds()
Indicates whether applying repetition to the expression invalidates the
boundedness computation.
|
Union |
union(CharClass right)
Returns the union of this character class with the specified
character class.
|
Union |
union(Union right)
Returns the union of this character class with the specified
character classes.
|
anyTimes, anyTimes, anyTimesPossessively, anyTimesReluctantly, atLeast, atLeast, atLeastOnce, atLeastOnce, atLeastOncePossessively, atLeastOnceReluctantly, atLeastPossessively, atLeastReluctantly, optional, optional, optionalPossessively, optionalReluctantly, repeat, repeat, repeat, repeat, repeatPossessively, repeatPossessively, repeatReluctantly, repeatReluctantly
andThen, andThen, then, then
or, or
toPattern, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
anyTimes, anyTimes, anyTimesPossessively, anyTimesReluctantly, atLeast, atLeast, atLeastOnce, atLeastOnce, atLeastOncePossessively, atLeastOnceReluctantly, atLeastPossessively, atLeastReluctantly, optional, optional, optionalPossessively, optionalReluctantly, repeat, repeat, repeat, repeat, repeatPossessively, repeatPossessively, repeatReluctantly, repeatReluctantly
andThen, andThen, then, then
or, or
toPattern
public final fj.data.LazyString expression()
Expression
expression
in interface Expression
public Integer boundedLength()
Expression
boundedLength
in interface Expression
public boolean repetitionInvalidatesBounds()
Expression
repetitionInvalidatesBounds
in interface Expression
public boolean possiblyZeroLength()
Expression
possiblyZeroLength
in interface Expression
public abstract CharClass negated()
public Union union(Union right)
public Union union(CharClass right)
public Intersection intersect(CharClass right)
public Intersection intersect(Intersection right)
public static SingleChar character(char c)
public static MultiChar characters(char c1, char c2, char... cs)
public static CharRange range(char first, char last)
first
- the minimum bound for the range.last
- the maximum bound for the range; must be greater than first.IllegalArgumentException
- if last <= first.Copyright © 2014 Richard W. Eggert II. All Rights Reserved.