Beispiel #1
0
 public OwnedCollection(Collection<E> wrapped, RefObject owner) {
   this.wrapped = wrapped;
   this.owner = owner;
   for (E e : wrapped) {
     e.markOwner(owner);
   }
 }
Beispiel #2
0
 public boolean addAll(Collection<? extends E> c) {
   for (E e : c) {
     e.markOwner(owner);
   }
   return wrapped.addAll(c);
 }
Beispiel #3
0
 public boolean add(E e) {
   e.markOwner(owner);
   return wrapped.add(e);
 }