Record Class IntMatchFilterElement
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.filters.IntMatchFilterElement
- Record Components:
matchValue- the integer value a match
- All Implemented Interfaces:
IntFilterElement
This filter element is immutable and accepts a matching Integer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thematchValuerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionIntMatchFilterElement(int matchValue) Creates an instance of aIntMatchFilterElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(int intValue) Determines whether or not a filtered Integer is accepted.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thematchValuerecord component.toString()Returns a string representation of this record class.
-
Field Details
-
matchValue
private final int matchValueThe field for thematchValuerecord component.
-
-
Constructor Details
-
IntMatchFilterElement
IntMatchFilterElement(int matchValue) Creates an instance of aIntMatchFilterElementrecord class.- Parameters:
matchValue- the value for thematchValuerecord component
-
-
Method Details
-
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.
-
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. -
matchValue
public int matchValue()Returns the value of thematchValuerecord component.- Returns:
- the value of the
matchValuerecord component
-