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