Example #1
0
 public int indexOf(Object o) {
   int index = _cache.indexOf(o);
   if (index != -1) {
     return index;
   }
   return _persistentList.indexOf(o);
 }
Example #2
0
 public boolean contains(Object o) {
   ensureInitFastListCache();
   if (_cache.contains(o)) {
     return true;
   }
   return _persistentList.contains(o);
 }
Example #3
0
 public Object get(int index) {
   ensureInitFastListCache();
   CachedObject co = _cache.get(index);
   if (co != CachedObject.NONE) {
     return co.obj;
   }
   return _persistentList.get(index);
 }
Example #4
0
 public boolean containsAll(Collection c) {
   ensureInitFastListCache();
   boolean ret = _cache.containsAll(c);
   if (ret) {
     return true;
   }
   return _persistentList.containsAll(new JdkCollectionIterable4(c));
 }
Example #5
0
 public void clear() {
   ensureInitFastListCache();
   _cache.clear();
   _persistentList.clear();
 }
Example #6
0
 public boolean addAll(int index, Collection c) {
   validateIndex(index);
   ensureInitFastListCache();
   _cache.addAll(index, c);
   return _persistentList.addAll(index, new JdkCollectionIterable4(c));
 }
Example #7
0
 public boolean addAll(final Collection c) {
   ensureInitFastListCache();
   _cache.addAll(c);
   return _persistentList.addAll(new JdkCollectionIterable4(c));
 }
Example #8
0
 public void add(int index, Object element) {
   validateIndex(index);
   ensureInitFastListCache();
   _cache.add(index, element);
   _persistentList.add(index, element);
 }
Example #9
0
 public boolean add(Object o) {
   ensureInitFastListCache();
   _cache.add(o);
   return _persistentList.add(o);
 }
Example #10
0
 public Object set(int index, Object element) {
   validateIndex(index);
   ensureInitFastListCache();
   _cache.set(index, element);
   return _persistentList.set(index, element);
 }
Example #11
0
 public boolean retainAll(Collection c) {
   ensureInitFastListCache();
   _cache.retainAll(c);
   return _persistentList.retainAll(new JdkCollectionIterable4(c));
 }
Example #12
0
 public Object remove(int index) {
   ensureInitFastListCache();
   _cache.remove(index);
   return _persistentList.remove(index);
 }
Example #13
0
 public boolean remove(Object o) {
   ensureInitFastListCache();
   _cache.remove(o);
   return _persistentList.remove(o);
 }