Record Class RegexPattern.Group.Named
java.lang.Object
java.lang.Record
com.google.common.labs.regex.RegexPattern.Group.Named
- All Implemented Interfaces:
RegexPattern
,RegexPattern.Group
- Enclosing interface:
RegexPattern.Group
public static record RegexPattern.Group.Named(String name, RegexPattern content)
extends Record
implements RegexPattern.Group
A named capturing group, like
(?<name>a)
.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.labs.regex.RegexPattern
RegexPattern.Alternation, RegexPattern.Anchor, RegexPattern.AtLeast, RegexPattern.AtMost, RegexPattern.CharacterProperty, RegexPattern.CharacterSet, RegexPattern.CharRange, RegexPattern.CharSetElement, RegexPattern.Group, RegexPattern.Limited, RegexPattern.Literal, RegexPattern.LiteralChar, RegexPattern.Lookaround, RegexPattern.PosixCharClass, RegexPattern.PredefinedCharClass, RegexPattern.Quantified, RegexPattern.Quantifier, RegexPattern.Sequence, RegexPattern.UnicodeProperty
Nested classes/interfaces inherited from interface com.google.common.labs.regex.RegexPattern.Group
RegexPattern.Group.Capturing, RegexPattern.Group.Named, RegexPattern.Group.NonCapturing
-
Constructor Summary
ConstructorsConstructorDescriptionNamed
(String name, RegexPattern content) Creates an instance of aNamed
record class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()
Returns the value of thecontent
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.common.labs.regex.RegexPattern
followedBy, notFollowedBy, notPrecededBy, precededBy
-
Constructor Details
-
Named
Creates an instance of aNamed
record class.- Parameters:
name
- the value for thename
record componentcontent
- the value for thecontent
record component
-
-
Method Details
-
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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
content
Returns the value of thecontent
record component.- Returns:
- the value of the
content
record component
-