From d75b9a8fe66f22d3f7f401411bd5f9df90d12a52 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Tue, 3 May 2011 10:29:44 +0000 Subject: [PATCH] #6286 Getters for fields of SimpleStringFilter to enable creation of lazy implementations svn changeset:18601/svn branch:6.6 --- .../data/util/filter/SimpleStringFilter.java | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/com/vaadin/data/util/filter/SimpleStringFilter.java b/src/com/vaadin/data/util/filter/SimpleStringFilter.java index 4637fad90f..c487d9fe0f 100644 --- a/src/com/vaadin/data/util/filter/SimpleStringFilter.java +++ b/src/com/vaadin/data/util/filter/SimpleStringFilter.java @@ -92,4 +92,52 @@ public final class SimpleStringFilter implements Filter { return (propertyId != null ? propertyId.hashCode() : 0) ^ (filterString != null ? filterString.hashCode() : 0); } + + /** + * Returns the property identifier to which this filter applies. + * + * @return property id + */ + public Object getPropertyId() { + return propertyId; + } + + /** + * Returns the filter string. + * + * Note: this method is intended only for implementations of lazy string + * filters and may change in the future. + * + * @return filter string given to the constructor + */ + public String getFilterString() { + return filterString; + } + + /** + * Returns whether the filter is case-insensitive or case-sensitive. + * + * Note: this method is intended only for implementations of lazy string + * filters and may change in the future. + * + * @return true if performing case-insensitive filtering, false for + * case-sensitive + */ + public boolean isIgnoreCase() { + return ignoreCase; + } + + /** + * Returns true if the filter only applies to the beginning of the value + * string, false for any location in the value. + * + * Note: this method is intended only for implementations of lazy string + * filters and may change in the future. + * + * @return true if checking for matches at the beginning of the value only, + * false if matching any part of value + */ + public boolean isOnlyMatchPrefix() { + return onlyMatchPrefix; + } } -- 2.39.5