Class IntRangeFilterElement
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.filters.IntRangeFilterElement
-
- All Implemented Interfaces:
IntFilterElement
class IntRangeFilterElement extends java.lang.Object implements IntFilterElement
This filter element is immutable and accepts an Integer in a range.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.IntegerlowerBoundLower bound of the range.private java.lang.IntegerupperBoundUpper bound of the range.
-
Constructor Summary
Constructors Constructor Description IntRangeFilterElement(int lowerBound, int upperBound)Constructs aIntRangeFilterElementwith a lower bound and an upper bound for the range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(int intValue)Determines whether or not a filtered Integer is accepted.booleanequals(java.lang.Object other)inthashCode()
-
-
-
Field Detail
-
lowerBound
private final java.lang.Integer lowerBound
Lower bound of the range.
-
upperBound
private final java.lang.Integer upperBound
Upper bound of the range.
-
-
Constructor Detail
-
IntRangeFilterElement
IntRangeFilterElement(int lowerBound, int upperBound)
Constructs aIntRangeFilterElementwith a lower bound and an upper bound for the range.- Parameters:
lowerBound- the lower bound of the range.upperBound- the upper bound of the range.
-
-
Method Detail
-
accept
public boolean accept(int intValue)
Description copied from interface:IntFilterElementDetermines whether or not a filtered Integer is accepted.- Specified by:
acceptin interfaceIntFilterElement- Parameters:
intValue- the Integer to filter.- Returns:
- true if the intValue is accepted.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
-