Package org.rekex.regexp
Record Class RegExp.Quantified
java.lang.Object
java.lang.Record
org.rekex.regexp.RegExp.Quantified
- All Implemented Interfaces:
RegExp
- Enclosing interface:
- RegExp
-
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.Quantified -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final longstatic final charstatic final char -
Constructor Summary
ConstructorsConstructorDescriptionQuantified(RegExp arg, long min, long max, char greediness) Creates an instance of aQuantifiedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionarg()Returns the value of theargrecord component.final booleanIndicates whether some other object is "equal to" this one.charReturns the value of thegreedinessrecord component.final inthashCode()Returns a hash code value for this object.longmax()Returns the value of themaxrecord component.longmin()Returns the value of theminrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
INFINITY
public static final long INFINITY- See Also:
-
greedy
public static final char greedy- See Also:
-
reluctant
public static final char reluctant- See Also:
-
possessive
public static final char possessive- See Also:
-
-
Constructor Details
-
Quantified
Creates an instance of aQuantifiedrecord class.- Parameters:
arg- the value for theargrecord componentmin- the value for theminrecord componentmax- the value for themaxrecord componentgreediness- the value for thegreedinessrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
arg
Returns the value of theargrecord component.- Returns:
- the value of the
argrecord component
-
min
public long min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public long max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
greediness
public char greediness()Returns the value of thegreedinessrecord component.- Returns:
- the value of the
greedinessrecord component
-