Record Class IntRangeFilterElement
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.filters.IntRangeFilterElement
- Record Components:
lowerBound
- the lower bound of the rangeupperBound
- the upper bound of the range
- All Implemented Interfaces:
IntFilterElement
record IntRangeFilterElement(Integer lowerBound, Integer upperBound)
extends Record
implements IntFilterElement
This filter element is immutable and accepts an Integer in a range.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Integer
The field for thelowerBound
record component.private final Integer
The field for theupperBound
record component. -
Constructor Summary
ConstructorsConstructorDescriptionIntRangeFilterElement
(Integer lowerBound, Integer upperBound) Creates an instance of aIntRangeFilterElement
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(int intValue) Determines whether or not a filtered Integer is accepted.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelowerBound
record component.toString()
Returns a string representation of this record class.Returns the value of theupperBound
record component.
-
Field Details
-
lowerBound
The field for thelowerBound
record component. -
upperBound
The field for theupperBound
record component.
-
-
Constructor Details
-
IntRangeFilterElement
IntRangeFilterElement(Integer lowerBound, Integer upperBound) Creates an instance of aIntRangeFilterElement
record class.- Parameters:
lowerBound
- the value for thelowerBound
record componentupperBound
- the value for theupperBound
record component
-
-
Method Details
-
accept
Description copied from interface:IntFilterElement
Determines whether or not a filtered Integer is accepted.- Specified by:
accept
in interfaceIntFilterElement
- Parameters:
intValue
- the Integer to filter.- Returns:
- true if the intValue is accepted.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 withObjects::equals(Object,Object)
. -
lowerBound
Returns the value of thelowerBound
record component.- Returns:
- the value of the
lowerBound
record component
-
upperBound
Returns the value of theupperBound
record component.- Returns:
- the value of the
upperBound
record component
-