Ejemplo n.º 1
0
 /** {@inheritDoc} */
 public boolean containsAll(TDoubleCollection collection) {
   TDoubleIterator iter = collection.iterator();
   while (iter.hasNext()) {
     if (!TDoubleIntHashMap.this.containsKey(iter.next())) {
       return false;
     }
   }
   return true;
 }
Ejemplo n.º 2
0
 /** {@inheritDoc} */
 public boolean retainAll(TDoubleCollection collection) {
   if (this == collection) {
     return false;
   }
   boolean modified = false;
   TDoubleIterator iter = iterator();
   while (iter.hasNext()) {
     if (!collection.contains(iter.next())) {
       iter.remove();
       modified = true;
     }
   }
   return modified;
 }
Ejemplo n.º 3
0
 /** {@inheritDoc} */
 public boolean removeAll(TDoubleCollection collection) {
   if (this == collection) {
     clear();
     return true;
   }
   boolean changed = false;
   TDoubleIterator iter = collection.iterator();
   while (iter.hasNext()) {
     double element = iter.next();
     if (remove(element)) {
       changed = true;
     }
   }
   return changed;
 }
 @Override
 public double getNoEntryValue() {
   return c.getNoEntryValue();
 }
 @Override
 public boolean contains(double o) {
   synchronized (mutex) {
     return c.contains(o);
   }
 }
 @Override
 public double[] toArray(double[] a) {
   synchronized (mutex) {
     return c.toArray(a);
   }
 }
 @Override
 public int size() {
   synchronized (mutex) {
     return c.size();
   }
 }
 @Override
 public boolean isEmpty() {
   synchronized (mutex) {
     return c.isEmpty();
   }
 }
 @Override
 public void clear() {
   synchronized (mutex) {
     c.clear();
   }
 }
 @Override
 public String toString() {
   synchronized (mutex) {
     return c.toString();
   }
 }
 @Override
 public boolean remove(double o) {
   synchronized (mutex) {
     return c.remove(o);
   }
 }
 @Override
 public boolean add(double e) {
   synchronized (mutex) {
     return c.add(e);
   }
 }
 @Override
 public boolean retainAll(double[] array) {
   synchronized (mutex) {
     return c.retainAll(array);
   }
 }
 @Override
 public boolean retainAll(TDoubleCollection coll) {
   synchronized (mutex) {
     return c.retainAll(coll);
   }
 }
 @Override
 public boolean removeAll(Collection<?> coll) {
   synchronized (mutex) {
     return c.removeAll(coll);
   }
 }
 @Override
 public boolean addAll(Collection<? extends Double> coll) {
   synchronized (mutex) {
     return c.addAll(coll);
   }
 }
 @Override
 public boolean containsAll(Collection<?> coll) {
   synchronized (mutex) {
     return c.containsAll(coll);
   }
 }
 @Override
 public boolean forEach(TDoubleProcedure procedure) {
   synchronized (mutex) {
     return c.forEach(procedure);
   }
 }
 @Override
 public TDoubleIterator iterator() {
   return c.iterator(); // Must be manually synched by user!
 }