Class IntRangeFilterElement

java.lang.Object
com.puppycrawl.tools.checkstyle.filters.IntRangeFilterElement
All Implemented Interfaces:
IntFilterElement

This filter element is immutable and accepts an Integer in a range.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Integer
    Lower bound of the range.
    private final Integer
    Upper bound of the range.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IntRangeFilterElement(int lowerBound, int upperBound)
    Constructs a IntRangeFilterElement with a lower bound and an upper bound for the range.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(int intValue)
    Determines whether or not a filtered Integer is accepted.
    boolean
    equals(Object other)
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • IntRangeFilterElement

      IntRangeFilterElement(int lowerBound, int upperBound)
      Constructs a IntRangeFilterElement with 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 Details

    • accept

      public boolean accept(int intValue)
      Description copied from interface: IntFilterElement
      Determines whether or not a filtered Integer is accepted.
      Specified by:
      accept in interface IntFilterElement
      Parameters:
      intValue - the Integer to filter.
      Returns:
      true if the intValue is accepted.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object