Package com.helger.commons.regex
Class RegExPattern
- java.lang.Object
-
- com.helger.commons.regex.RegExPattern
-
@NotThreadSafe public final class RegExPattern extends Object
This class encapsulates a String and a set of options to be used in Pattern compilation- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description RegExPattern(String sRegEx)RegExPattern(String sRegEx, int nOptions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanareDebugConsistencyChecksEnabled()static voidcheckPatternConsistency(String sRegEx)static voidenableDebugConsistencyChecks(boolean bEnable)booleanequals(Object o)PatterngetAsPattern()intgetOptions()StringgetRegEx()inthashCode()StringtoString()
-
-
-
Method Detail
-
areDebugConsistencyChecksEnabled
public static boolean areDebugConsistencyChecksEnabled()
-
enableDebugConsistencyChecks
public static void enableDebugConsistencyChecks(boolean bEnable)
-
getRegEx
@Nonnull @Nonempty @RegEx public String getRegEx()
- Returns:
- The source regular expression string. Neither
nullnor empty.
-
getOptions
@Nonnegative public int getOptions()
- Returns:
- The RegEx options provided in the constructor. 0 means no options.
-
-