From 1f5fbef1fed82bea5279c4503a59c30457842c15 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Tue, 26 Apr 2011 10:47:31 +0000 Subject: [PATCH] #6527 Minor cleanup in AbstractInMemoryContainer svn changeset:18461/svn branch:6.6 --- .../data/util/AbstractBeanContainer.java | 2 +- .../data/util/AbstractInMemoryContainer.java | 58 ++++++++++++------- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/src/com/vaadin/data/util/AbstractBeanContainer.java b/src/com/vaadin/data/util/AbstractBeanContainer.java index f19833ccfa..fb9cd23d71 100644 --- a/src/com/vaadin/data/util/AbstractBeanContainer.java +++ b/src/com/vaadin/data/util/AbstractBeanContainer.java @@ -644,7 +644,7 @@ public abstract class AbstractBeanContainer extends if (modified) { // Filter the contents when all items have been added - if (getFilteredItemIds() != null) { + if (isFiltered()) { filterAll(); } else { fireItemSetChange(); diff --git a/src/com/vaadin/data/util/AbstractInMemoryContainer.java b/src/com/vaadin/data/util/AbstractInMemoryContainer.java index e41bb42258..f8ad4b530a 100644 --- a/src/com/vaadin/data/util/AbstractInMemoryContainer.java +++ b/src/com/vaadin/data/util/AbstractInMemoryContainer.java @@ -540,7 +540,7 @@ public abstract class AbstractInMemoryContainer getVisibleItemIds() { - if (getFilteredItemIds() != null) { + if (isFiltered()) { return getFilteredItemIds(); } else { return getAllItemIds(); @@ -821,18 +821,31 @@ public abstract class AbstractInMemoryContainer filteredItemIds) { this.filteredItemIds = filteredItemIds; } /** - * TODO Temporary internal helper method to get the internal list of - * filtered item identifiers. + * Internal helper method to get the internal list of filtered item + * identifiers. Should not be used outside this class except for + * implementing clone(), may disappear from future versions - use + * {@link #getVisibleItemIds()} in other contexts. * * @return List */ @@ -841,20 +854,21 @@ public abstract class AbstractInMemoryContainer allItemIds) { this.allItemIds = allItemIds; } /** - * TODO Temporary internal helper method to get the internal list of all - * item identifiers. Should not be used outside this class without - * exceptional justification, may disappear in future versions. + * Internal helper method to get the internal list of all item identifiers. + * Avoid using this method outside this class, may disappear in future + * versions. * * @return List */ @@ -863,8 +877,12 @@ public abstract class AbstractInMemoryContainerremove*Filter* (which also re-filter the container) instead + * when possible. * * @param filters */ @@ -873,8 +891,8 @@ public abstract class AbstractInMemoryContainer */ -- 2.39.5