|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.data.util.filter.Compare
public abstract class Compare
Simple container filter comparing an item property value against a given
constant value. Use the nested classes 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.
Nested Class Summary | |
---|---|
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
|
Method Summary | |
---|---|
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). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean passesFilter(Object itemId, Item item)
Container.Filter
passesFilter
in interface Container.Filter
itemId
- identifier of the item being filtered; may be null when
the item is being added to the containeritem
- the item being filtered
protected int compareValue(Object value1)
public boolean appliesToProperty(Object propertyId)
Container.Filter
appliesToProperty
in interface Container.Filter
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Object getPropertyId()
public Compare.Operation getOperation()
Compare.Operation
public Object getValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |