Record Class RegexPattern.CharRange
java.lang.Object
java.lang.Record
com.google.common.labs.regex.RegexPattern.CharRange
- All Implemented Interfaces:
RegexPattern.CharSetElement
- Enclosing interface:
RegexPattern
public static record RegexPattern.CharRange(char start, char end)
extends Record
implements RegexPattern.CharSetElement
Represents a range of characters within a character class, e.g., 'a-z'.
-
Constructor Summary
ConstructorsConstructorDescriptionCharRange(char start, char end) Creates an instance of aCharRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncharend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.charstart()Returns the value of thestartrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
CharRange
public CharRange(char start, char end) Creates an instance of aCharRangerecord class.- Parameters:
start- the value for thestartrecord componentend- the value for theendrecord component
-
-
Method Details
-
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. -
start
public char start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
public char end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-