|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.data.util.filter.SimpleStringFilter
public final class SimpleStringFilter
Simple string filter for matching items that start with or contain a specified string. The matching can be case-sensitive or case-insensitive. This filter also directly supports in-memory filtering. When performing in-memory filtering, values of other types are converted using toString(), but other (lazy container) implementations do not need to perform such conversions and might not support values of different types. Note that this filter is modeled after the pre-6.6 filtering mechanisms, and might not be very efficient e.g. for database filtering. TODO this might still change
Constructor Summary | |
---|---|
SimpleStringFilter(Object propertyId,
String filterString,
boolean ignoreCase,
boolean onlyMatchPrefix)
|
Method Summary | |
---|---|
boolean |
appliesToProperty(Object propertyId)
Check if a change in the value of a property can affect the filtering result. |
boolean |
equals(Object obj)
|
String |
getFilterString()
Returns the filter string. |
Object |
getPropertyId()
Returns the property identifier to which this filter applies. |
int |
hashCode()
|
boolean |
isIgnoreCase()
Returns whether the filter is case-insensitive or case-sensitive. |
boolean |
isOnlyMatchPrefix()
Returns true if the filter only applies to the beginning of the value string, false for any location in the value. |
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 |
Constructor Detail |
---|
public SimpleStringFilter(Object propertyId, String filterString, boolean ignoreCase, boolean onlyMatchPrefix)
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
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 String getFilterString()
public boolean isIgnoreCase()
public boolean isOnlyMatchPrefix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |