Record Class RegexPattern.Limited
java.lang.Object
java.lang.Record
com.google.common.labs.regex.RegexPattern.Limited
- All Implemented Interfaces:
RegexPattern.Quantifier,Function<RegexPattern, RegexPattern>,UnaryOperator<RegexPattern>
- Enclosing interface:
RegexPattern
public static record RegexPattern.Limited(int min, int max, boolean isReluctant, boolean isPossessive)
extends Record
implements RegexPattern.Quantifier
Represents a quantifier with both minimum and maximum bounds, like
{n} or
{min,max}.-
Constructor Summary
ConstructorsConstructorDescriptionLimited(int min, int max, boolean isReluctant, boolean isPossessive) Creates an instance of aLimitedrecord 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.intmax()Returns the value of themaxrecord 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
-
Limited
public Limited(int min, int max, boolean isReluctant, boolean isPossessive) Creates an instance of aLimitedrecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord 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
-
max
public int max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord 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
-