|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<RegularExpressionConverter.Flag> net.sf.uadetector.internal.util.RegularExpressionConverter.Flag
public static enum RegularExpressionConverter.Flag
Enum Constant Summary | |
---|---|
CANON_EQ
Enables canonical equivalence. |
|
CASE_INSENSITIVE
Enables case-insensitive matching. |
|
COMMENTS
Permits whitespace and comments in pattern. |
|
DOTALL
Enables dotall mode. |
|
LITERAL
Enables literal parsing of the pattern. |
|
MULTILINE
Enables multiline mode. |
|
UNICODE_CASE
Enables Unicode-aware case folding. |
|
UNIX_LINES
Enables Unix lines mode. |
Method Summary | |
---|---|
static int |
convertToBitmask(java.util.Collection<RegularExpressionConverter.Flag> flags)
Converts a set of flags as to a bitmask (sum of numerical values). |
static java.lang.String |
convertToModifiers(java.util.Collection<RegularExpressionConverter.Flag> flags)
Converts a set of flags as to a string representation. |
static RegularExpressionConverter.Flag |
evaluateByCharacter(char flag)
This method try to find a matching enum value by the given character representation. |
static RegularExpressionConverter.Flag |
evaluateByNumber(int flag)
This method try to find a matching enum value by the given numerical representation. |
char |
getCharacter()
Returns this flag as character representation. |
int |
getNumber()
Returns this flag as numerical representation. |
static java.util.Set<RegularExpressionConverter.Flag> |
parse(int bitmask)
Parses a sum of flags as numerical values (bitmask) and translates it to set of enum values. |
static java.util.Set<RegularExpressionConverter.Flag> |
parse(java.lang.String modifiers)
Translates PERL style modifiers to a set of Pattern compatible ones. |
static RegularExpressionConverter.Flag |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static RegularExpressionConverter.Flag[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final RegularExpressionConverter.Flag CANON_EQ
public static final RegularExpressionConverter.Flag CASE_INSENSITIVE
public static final RegularExpressionConverter.Flag COMMENTS
public static final RegularExpressionConverter.Flag DOTALL
public static final RegularExpressionConverter.Flag LITERAL
public static final RegularExpressionConverter.Flag MULTILINE
public static final RegularExpressionConverter.Flag UNICODE_CASE
public static final RegularExpressionConverter.Flag UNIX_LINES
Method Detail |
---|
public static RegularExpressionConverter.Flag[] values()
for (RegularExpressionConverter.Flag c : RegularExpressionConverter.Flag.values()) System.out.println(c);
public static RegularExpressionConverter.Flag valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic static int convertToBitmask(@Nonnull java.util.Collection<RegularExpressionConverter.Flag> flags)
flags
- a set of flags
public static java.lang.String convertToModifiers(@Nonnull java.util.Collection<RegularExpressionConverter.Flag> flags)
CASE_INSENSITIVE
,
DOTALL
, MULTILINE
and COMMENTS
are identical to the PERL regular
expression modifiers.
flags
- a set of flags
public static RegularExpressionConverter.Flag evaluateByCharacter(char flag)
flag
- representation of a flag as a character
null
net.sf.qualitycheck.exception.IllegalNegativeArgumentException
- if the given number is smaller than zeropublic static RegularExpressionConverter.Flag evaluateByNumber(int flag)
flag
- representation of a flag as a character
null
net.sf.qualitycheck.exception.IllegalNegativeArgumentException
- if the given number is smaller than zero@Nonnull public static java.util.Set<RegularExpressionConverter.Flag> parse(@Nonnegative int bitmask)
bitmask
- Sum of numerical values of flags
net.sf.qualitycheck.exception.IllegalNegativeArgumentException
- if the given number is smaller than zeropublic static java.util.Set<RegularExpressionConverter.Flag> parse(@Nonnull java.lang.String modifiers)
Pattern
compatible ones.
modifiers
- modifiers as string of a PERL style regular expression
public char getCharacter()
public int getNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |