summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@itmill.com>2011-03-02 07:22:17 +0000
committerHenri Sara <henri.sara@itmill.com>2011-03-02 07:22:17 +0000
commit59d0a558ee01c72244b2d95af1678c9d17a972a0 (patch)
tree16fd9060e23a4dfa0e3f77e0230a6309a1479700
parente581a1814abbd4d6fbbf00530ab0acc42f3259c8 (diff)
downloadvaadin-framework-59d0a558ee01c72244b2d95af1678c9d17a972a0.tar.gz
vaadin-framework-59d0a558ee01c72244b2d95af1678c9d17a972a0.zip
#6527 Container refactoring: move internalIndexOf() to AbstractInMemoryContainer
svn changeset:17537/svn branch:6.6
-rw-r--r--src/com/vaadin/data/util/AbstractBeanContainer.java13
-rw-r--r--src/com/vaadin/data/util/AbstractInMemoryContainer.java13
-rw-r--r--src/com/vaadin/data/util/IndexedContainer.java4
3 files changed, 15 insertions, 15 deletions
diff --git a/src/com/vaadin/data/util/AbstractBeanContainer.java b/src/com/vaadin/data/util/AbstractBeanContainer.java
index d0b8259ff3..45b7df6535 100644
--- a/src/com/vaadin/data/util/AbstractBeanContainer.java
+++ b/src/com/vaadin/data/util/AbstractBeanContainer.java
@@ -651,19 +651,6 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
}
/**
- * Returns the index of an item within the unfiltered collection of items.
- *
- * For internal use by subclasses only. This API is experimental and subject
- * to change.
- *
- * @param itemId
- * @return
- */
- protected int internalIndexOf(IDTYPE itemId) {
- return allItemIds.indexOf(itemId);
- }
-
- /**
* Adds a bean at the given index of the internal (unfiltered) list.
* <p>
* The item is also added in the visible part of the list if it passes the
diff --git a/src/com/vaadin/data/util/AbstractInMemoryContainer.java b/src/com/vaadin/data/util/AbstractInMemoryContainer.java
index 63f90399d9..47d64aa8c7 100644
--- a/src/com/vaadin/data/util/AbstractInMemoryContainer.java
+++ b/src/com/vaadin/data/util/AbstractInMemoryContainer.java
@@ -221,6 +221,19 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
}
/**
+ * Returns the index of an item within the unfiltered collection of items.
+ *
+ * For internal use by subclasses only. This API is experimental and subject
+ * to change.
+ *
+ * @param itemId
+ * @return
+ */
+ protected int internalIndexOf(ITEMIDTYPE itemId) {
+ return allItemIds.indexOf(itemId);
+ }
+
+ /**
* Returns the internal list of visible item identifiers after filtering.
*
* For internal use only.
diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java
index fda93fe84d..79cad195b3 100644
--- a/src/com/vaadin/data/util/IndexedContainer.java
+++ b/src/com/vaadin/data/util/IndexedContainer.java
@@ -405,11 +405,11 @@ public class IndexedContainer extends
} else if (index == size()) {
// add just after the last item
Object id = getIdByIndex(index - 1);
- internalIndex = allItemIds.indexOf(id) + 1;
+ internalIndex = internalIndexOf(id) + 1;
} else if (index > 0 && index < size()) {
// map the index of the visible item to its unfiltered index
Object id = getIdByIndex(index);
- internalIndex = allItemIds.indexOf(id);
+ internalIndex = internalIndexOf(id);
}
if (internalIndex >= 0) {
return addItemAtInternalIndex(internalIndex, newItemId);