Record Class RegexPattern.AtLeast
java.lang.Object
java.lang.Record
com.google.common.labs.regex.RegexPattern.AtLeast
- All Implemented Interfaces:
RegexPattern.Quantifier
,Function<RegexPattern, RegexPattern>
,UnaryOperator<RegexPattern>
- Enclosing interface:
RegexPattern
public static record RegexPattern.AtLeast(int min, boolean isReluctant, boolean isPossessive)
extends Record
implements RegexPattern.Quantifier
Represents a quantifier with a minimum bound, like
{min,}
, *
, or +
.-
Constructor Summary
ConstructorsConstructorDescriptionAtLeast
(int min, boolean isReluctant, boolean isPossessive) Creates an instance of aAtLeast
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisPossessive
record component.boolean
Returns the value of theisReluctant
record component.int
min()
Returns the value of themin
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.Quantifier
apply
-
Constructor Details
-
AtLeast
public AtLeast(int min, boolean isReluctant, boolean isPossessive) Creates an instance of aAtLeast
record class.- Parameters:
min
- the value for themin
record componentisReluctant
- the value for theisReluctant
record componentisPossessive
- the value for theisPossessive
record component
-
-
Method Details
-
reluctant
- Specified by:
reluctant
in interfaceRegexPattern.Quantifier
-
possessive
- Specified by:
possessive
in interfaceRegexPattern.Quantifier
-
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 with thecompare
method from their corresponding wrapper classes. -
min
public int min()Returns the value of themin
record component.- Returns:
- the value of the
min
record component
-
isReluctant
public boolean isReluctant()Returns the value of theisReluctant
record component.- Specified by:
isReluctant
in interfaceRegexPattern.Quantifier
- Returns:
- the value of the
isReluctant
record component
-
isPossessive
public boolean isPossessive()Returns the value of theisPossessive
record component.- Specified by:
isPossessive
in interfaceRegexPattern.Quantifier
- Returns:
- the value of the
isPossessive
record component
-