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