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 aAtLeastrecord class. -
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.booleanReturns the value of theisPossessiverecord component.booleanReturns the value of theisReluctantrecord component.intmin()Returns the value of theminrecord component.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aAtLeastrecord class.- Parameters:
min- the value for theminrecord componentisReluctant- the value for theisReluctantrecord componentisPossessive- the value for theisPossessiverecord component
-
-
Method Details
-
reluctant
- Specified by:
reluctantin interfaceRegexPattern.Quantifier
-
possessive
- Specified by:
possessivein 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 thecomparemethod from their corresponding wrapper classes. -
min
public int min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
isReluctant
public boolean isReluctant()Returns the value of theisReluctantrecord component.- Specified by:
isReluctantin interfaceRegexPattern.Quantifier- Returns:
- the value of the
isReluctantrecord component
-
isPossessive
public boolean isPossessive()Returns the value of theisPossessiverecord component.- Specified by:
isPossessivein interfaceRegexPattern.Quantifier- Returns:
- the value of the
isPossessiverecord component
-