示例#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);
 }