Package net.sf.eBus.util.regex
Class CharacterSet
- java.lang.Object
-
- net.sf.eBus.util.regex.Component
-
- net.sf.eBus.util.regex.CharacterSet
-
- All Implemented Interfaces:
Serializable
public final class CharacterSet extends Component
This regular expression component matches only those characters listed in its set. This pattern element has an associated minimum and maximum range. The component must match at least the minimum count and up to the maximum count (inclusive).This set may also be negated which means that it will match any character except those listed in its set.
- Author:
- Charles Rapp
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class net.sf.eBus.util.regex.Component
ANY_CHAR, CHARACTER_SET, LITERAL, mIndex, mMaximumSize, mMinimumSize, mType, NO_MAX_MATCH_LIMIT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequalTo(char c)Returnstrueif this component is equal to the characterc; returnsfalseotherwise.booleangreaterThan(char c)Returnstrueif this component is greater than the characterc; returnsfalseotherwise.booleanisNegated()Returnstrueif this character is negated (^) andfalseotherwise.booleanlessThan(char c)Returnstrueif this component is less than the characterc; returnsfalseotherwise.StringtoString()Returns a textual representation of a character set.-
Methods inherited from class net.sf.eBus.util.regex.Component
appendSize, index, maximumSize, minimumSize, type
-
-
-
-
Method Detail
-
lessThan
public boolean lessThan(char c)
Returnstrueif this component is less than the characterc; returnsfalseotherwise. A character set is less than a specific character if the set's smallest character is less thanc.
-
equalTo
public boolean equalTo(char c)
Returnstrueif this component is equal to the characterc; returnsfalseotherwise. A character set is equal to a specific characer ifcis in the set.
-
greaterThan
public boolean greaterThan(char c)
Returnstrueif this component is greater than the characterc; returnsfalseotherwise. A character set is greater than a specified character if the set's maximum character is greater thanc.- Specified by:
greaterThanin classComponent- Parameters:
c- Test against this character.- Returns:
trueif this component is greater than the characterc; returnsfalseotherwise.
-
isNegated
public boolean isNegated()
Returnstrueif this character is negated (^) andfalseotherwise.- Returns:
trueif this character is negated (^) andfalseotherwise.
-
-