Record Class RegexPattern.ModifierDirective
java.lang.Object
java.lang.Record
com.google.common.labs.regex.RegexPattern.ModifierDirective
- All Implemented Interfaces:
RegexPattern
- Enclosing interface:
RegexPattern
public static record RegexPattern.ModifierDirective(List<RegexPattern.ModifierFlag> enabledModifierFlags, List<RegexPattern.ModifierFlag> disabledModifierFlags)
extends Record
implements RegexPattern
A standalone modifier directive, like
(?i) or (?is-m), which turns flags on or
off for the remainder of the enclosing group. Unlike (?i:), whose flags are scoped to
the (empty) group content, a directive affects everything that follows it.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.labs.regex.RegexPattern
RegexPattern.Alternation, RegexPattern.Anchor, RegexPattern.AtLeast, RegexPattern.AtMost, RegexPattern.Backreference, RegexPattern.CharacterProperty, RegexPattern.CharacterSet, RegexPattern.CharRange, RegexPattern.CharSetElement, RegexPattern.Group, RegexPattern.Limited, RegexPattern.Literal, RegexPattern.LiteralChar, RegexPattern.Lookaround, RegexPattern.Metadata, RegexPattern.ModifierDirective, RegexPattern.ModifierFlag, RegexPattern.PosixCharClass, RegexPattern.PredefinedCharClass, RegexPattern.Quantified, RegexPattern.Quantifier, RegexPattern.Sequence, RegexPattern.UnicodeProperty -
Constructor Summary
ConstructorsConstructorDescriptionModifierDirective(List<RegexPattern.ModifierFlag> enabledModifierFlags, List<RegexPattern.ModifierFlag> disabledModifierFlags) Creates an instance of aModifierDirectiverecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisabledModifierFlagsrecord component.Returns the value of theenabledModifierFlagsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns this pattern's metadata that may be useful for static analysis.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.common.labs.regex.RegexPattern
followedBy, notFollowedBy, notPrecededBy, precededBy
-
Constructor Details
-
ModifierDirective
public ModifierDirective(List<RegexPattern.ModifierFlag> enabledModifierFlags, List<RegexPattern.ModifierFlag> disabledModifierFlags) Creates an instance of aModifierDirectiverecord class.- Parameters:
enabledModifierFlags- the value for theenabledModifierFlagsrecord componentdisabledModifierFlags- the value for thedisabledModifierFlagsrecord component
-
-
Method Details
-
metadata
Description copied from interface:RegexPatternReturns this pattern's metadata that may be useful for static analysis.- Specified by:
metadatain interfaceRegexPattern
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
enabledModifierFlags
Returns the value of theenabledModifierFlagsrecord component.- Returns:
- the value of the
enabledModifierFlagsrecord component
-
disabledModifierFlags
Returns the value of thedisabledModifierFlagsrecord component.- Returns:
- the value of the
disabledModifierFlagsrecord component
-