Esempio n. 1
0
 /** Removes an instance by its type. */
 public void remove(Class<? extends T> type) throws IOException {
   for (T t : data) {
     if (t.getClass() == type) {
       data.remove(t);
       onModified();
       return;
     }
   }
 }
Esempio n. 2
0
 public void removeAll(Class<? extends T> type) throws IOException {
   boolean modified = false;
   for (T t : data) {
     if (t.getClass() == type) {
       data.remove(t);
       modified = true;
     }
   }
   if (modified) onModified();
 }
Esempio n. 3
0
 public int size() {
   return data.size();
 }
Esempio n. 4
0
 public T get(int index) {
   return data.get(index);
 }
Esempio n. 5
0
 public void replaceBy(Collection<? extends T> col) throws IOException {
   data.replaceBy(col);
   onModified();
 }
Esempio n. 6
0
 public void addAll(Collection<? extends T> items) throws IOException {
   data.addAll(items);
   onModified();
 }
Esempio n. 7
0
 public void add(T item) throws IOException {
   data.add(item);
   onModified();
 }
Esempio n. 8
0
 protected PersistedList(Collection<? extends T> initialList) {
   data.replaceBy(initialList);
 }
Esempio n. 9
0
 public boolean isEmpty() {
   return data.isEmpty();
 }
Esempio n. 10
0
 public void addAllTo(Collection<? super T> dst) {
   data.addAllTo(dst);
 }
Esempio n. 11
0
 /** Gets all the {@link Describable}s in an array. */
 public T[] toArray(T[] array) {
   return data.toArray(array);
 }
Esempio n. 12
0
 /** Returns the snapshot view of instances as list. */
 public List<T> toList() {
   return data.getView();
 }
Esempio n. 13
0
 public Iterator<T> iterator() {
   return data.iterator();
 }
Esempio n. 14
0
 public void clear() {
   data.clear();
 }
Esempio n. 15
0
 public boolean remove(T o) throws IOException {
   boolean b = data.remove(o);
   if (b) onModified();
   return b;
 }