Package org.rekex.regexp
Record Class RegExp.CharClass.Predefined
java.lang.Object
java.lang.Record
org.rekex.regexp.RegExp.CharClass.Predefined
- All Implemented Interfaces:
RegExp,RegExp.CharClass
- Enclosing interface:
- RegExp.CharClass
public static record RegExp.CharClass.Predefined(String regex)
extends Record
implements RegExp.CharClass
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.rekex.regexp.RegExp
RegExp.Alternation, RegExp.AtomicGroup, RegExp.BackReference, RegExp.Boundary, RegExp.CharClass, RegExp.Concatenation, RegExp.Flagged, RegExp.Group, RegExp.Lookaround, RegExp.Opaque, RegExp.QuantifiedNested classes/interfaces inherited from interface org.rekex.regexp.RegExp.CharClass
RegExp.CharClass.Intersection, RegExp.CharClass.Negation, RegExp.CharClass.Predefined, RegExp.CharClass.Range, RegExp.CharClass.Single, RegExp.CharClass.Union -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.regex()Returns the value of theregexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Predefined
Creates an instance of aPredefinedrecord class.- Parameters:
regex- the value for theregexrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
regex
Returns the value of theregexrecord component.- Returns:
- the value of the
regexrecord component
-