public abstract class Compare extends Object implements Container.Filter
Compare.Equal, Compare.Greater,
Compare.Less, Compare.GreaterOrEqual and Compare.LessOrEqual instead of this
class directly.
This filter also directly supports in-memory filtering.
The reference and actual values must implement Comparable and the
class of the actual property value must be assignable from the class of the
reference value.| Modifier and Type | Class and Description |
|---|---|
static class |
Compare.Equal
A
Compare filter that accepts items for which the identified
property value is equal to value. |
static class |
Compare.Greater
A
Compare filter that accepts items for which the identified
property value is greater than value. |
static class |
Compare.GreaterOrEqual
A
Compare filter that accepts items for which the identified
property value is greater than or equal to value. |
static class |
Compare.Less
A
Compare filter that accepts items for which the identified
property value is less than value. |
static class |
Compare.LessOrEqual
A
Compare filter that accepts items for which the identified
property value is less than or equal to value. |
static class |
Compare.Operation |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appliesToProperty(Object propertyId)
Check if a change in the value of a property can affect the filtering
result.
|
protected int |
compareValue(Object value1) |
boolean |
equals(Object obj) |
Compare.Operation |
getOperation()
Returns the comparison operation.
|
Object |
getPropertyId()
Returns the property id of the property to compare against the fixed
value.
|
Object |
getValue()
Returns the value to compare the property against.
|
int |
hashCode() |
boolean |
passesFilter(Object itemId,
Item item)
Check if an item passes the filter (in-memory filtering).
|
public boolean passesFilter(Object itemId, Item item)
Container.FilterpassesFilter in interface Container.FilteritemId - identifier of the item being filtered; may be null when
the item is being added to the containeritem - the item being filteredprotected int compareValue(Object value1)
public boolean appliesToProperty(Object propertyId)
Container.FilterappliesToProperty in interface Container.Filterpublic Object getPropertyId()
public Compare.Operation getOperation()
Compare.Operationpublic Object getValue()
Copyright © 2017 Vaadin Ltd. All rights reserved.