Package com.nuix.superutilities.regex
Class PatternInfo
- java.lang.Object
-
- com.nuix.superutilities.regex.PatternInfo
-
public class PatternInfo extends java.lang.ObjectRepresents a regular expression including associated title.
-
-
Constructor Summary
Constructors Constructor Description PatternInfo(java.lang.String title, java.lang.String expression)Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompile(boolean caseSensitive, boolean multiline, boolean dotAll)Compiles the regular expression String provided into a Java Pattern objectjava.lang.StringgetExpression()Gets the Java regular expression string associated with this instancejava.util.regex.PatterngetPattern()Gets the compiled Pattern object.java.lang.StringgetTitle()Gets the title associated with this instance
-
-
-
Method Detail
-
compile
public void compile(boolean caseSensitive, boolean multiline, boolean dotAll)Compiles the regular expression String provided into a Java Pattern object- Parameters:
caseSensitive- Whether it should be case sensitivemultiline- Whether the multi-line matching flag should be setdotAll- Whether the dot matches all flag should be set
-
getTitle
public java.lang.String getTitle()
Gets the title associated with this instance- Returns:
- The associated title
-
getExpression
public java.lang.String getExpression()
Gets the Java regular expression string associated with this instance- Returns:
- The Java regular expression string
-
getPattern
public java.util.regex.Pattern getPattern()
Gets the compiled Pattern object. Note this will return null untilcompile(boolean, boolean, boolean)is called.- Returns:
- The compiled Pattern object or null if
compile(boolean, boolean, boolean)has not yet been called.
-
-