Package org.rekex.regexp
Record Class RegExp.BackReference.WithNumber
java.lang.Object
java.lang.Record
org.rekex.regexp.RegExp.BackReference.WithNumber
- All Implemented Interfaces:
RegExp,RegExp.BackReference
- Enclosing interface:
- RegExp.BackReference
public static record RegExp.BackReference.WithNumber(int number)
extends Record
implements RegExp.BackReference
-
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.BackReference
RegExp.BackReference.WithName, RegExp.BackReference.WithNumber -
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.intnumber()Returns the value of thenumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WithNumber
public WithNumber(int number) Creates an instance of aWithNumberrecord class.- Parameters:
number- the value for thenumberrecord 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 with '=='. -
number
public int number()Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-