public class RegexProgram extends Object
Constructor and Description |
---|
RegexProgram(String pattern)
Constructor for RegexProgram
|
RegexProgram(String pattern,
CaptureGroups capture)
Constructor for RegexProgram
|
RegexProgram(String pattern,
EnumSet<RegexFlag> flags)
Constructor for RegexProgram
|
RegexProgram(String pattern,
EnumSet<RegexFlag> flags,
CaptureGroups capture)
Constructor for RegexProgram
|
Modifier and Type | Method and Description |
---|---|
CaptureGroups |
capture()
Get the capture groups setting used to create this instance
|
int |
combinedFlags()
Combine the regex flags using 'or'
|
EnumSet<RegexFlag> |
flags()
Get the regex flags setting used to create this instance
|
String |
pattern()
Get the pattern used to create this instance
|
void |
setCapture(CaptureGroups capture)
Reset the capture groups setting for this instance
|
void |
setFlags(EnumSet<RegexFlag> flags)
Reset the regex flags setting for this instance
|
public RegexProgram(String pattern)
pattern
- Regex patternpublic RegexProgram(String pattern, EnumSet<RegexFlag> flags)
pattern
- Regex patternflags
- Regex flags settingpublic RegexProgram(String pattern, CaptureGroups capture)
pattern
- Regex pattern settingcapture
- Capture groups settingpublic RegexProgram(String pattern, EnumSet<RegexFlag> flags, CaptureGroups capture)
pattern
- Regex patternflags
- Regex flags settingcapture
- Capture groups settingpublic String pattern()
return
- A regex pattern as a stringpublic EnumSet<RegexFlag> flags()
return
- Regex flags settingpublic void setFlags(EnumSet<RegexFlag> flags)
flags
- Regex flags settingpublic CaptureGroups capture()
return
- Capture groups settingpublic void setCapture(CaptureGroups capture)
capture
- Capture groups settingpublic int combinedFlags()
return
- An integer representing the value of combined (or'ed) flagsCopyright © 2024. All rights reserved.