java.lang.Object
jakarta.mail.search.SearchTerm
jakarta.mail.search.ComparisonTerm
jakarta.mail.search.IntegerComparisonTerm
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MessageNumberTerm
,SizeTerm
This class implements comparisons for integers.
- See Also:
-
Field Summary
Fields inherited from class jakarta.mail.search.ComparisonTerm
comparison, EQ, GE, GT, LE, LT, NE
-
Constructor Summary
ModifierConstructorDescriptionprotected
IntegerComparisonTerm
(int comparison, int number) Constructor. -
Method Summary
Methods inherited from class jakarta.mail.search.SearchTerm
match
-
Field Details
-
number
protected int numberThe number.
-
-
Constructor Details
-
IntegerComparisonTerm
protected IntegerComparisonTerm(int comparison, int number) Constructor.- Parameters:
comparison
- the type of comparison.number
- the number to compare with.
-
-
Method Details
-
getNumber
public int getNumber()Return the number to compare with.- Returns:
- the number
-
getComparison
public int getComparison()Return the type of comparison.- Returns:
- the comparison type
-
match
protected boolean match(int i) Match against the argumenti
.- Parameters:
i
- the integer to match- Returns:
- true if given integer matches this comparison; otherwise false
-
equals
-
hashCode
public int hashCode()Compute a hashCode for this object.- Overrides:
hashCode
in classComparisonTerm
-