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 aCharRange
record class. -
Method Summary
Modifier and TypeMethodDescriptionchar
end()
Returns the value of theend
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.char
start()
Returns the value of thestart
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
CharRange
public CharRange(char start, char end) Creates an instance of aCharRange
record class.- Parameters:
start
- the value for thestart
record componentend
- the value for theend
record 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 thecompare
method from their corresponding wrapper classes. -
start
public char start()Returns the value of thestart
record component.- Returns:
- the value of the
start
record component
-
end
public char end()Returns the value of theend
record component.- Returns:
- the value of the
end
record component
-