/** {@inheritDoc} */
 public boolean removeAll(TFloatCollection collection) {
   boolean modified = false;
   TFloatIterator iter = iterator();
   while (iter.hasNext()) {
     if (collection.contains(iter.next())) {
       iter.remove();
       modified = true;
     }
   }
   return modified;
 }
 /** {@inheritDoc} */
 public boolean retainAll(Collection<?> collection) {
   boolean modified = false;
   TFloatIterator iter = iterator();
   while (iter.hasNext()) {
     if (!collection.contains(Float.valueOf(iter.next()))) {
       iter.remove();
       modified = true;
     }
   }
   return modified;
 }
 /** {@inheritDoc} */
 @SuppressWarnings({"SuspiciousMethodCalls"})
 public boolean retainAll(Collection<?> collection) {
   boolean modified = false;
   TFloatIterator iter = iterator();
   while (iter.hasNext()) {
     if (!collection.contains(Float.valueOf(iter.next()))) {
       iter.remove();
       modified = true;
     }
   }
   return modified;
 }
Пример #4
0
 /** {@inheritDoc} */
 @Override
 public boolean retainAll(Collection<?> collection) {
   boolean modified = false;
   TFloatIterator iter = iterator();
   while (iter.hasNext()) {
     //noinspection SuspiciousMethodCalls
     if (!collection.contains(Float.valueOf(iter.next()))) {
       iter.remove();
       modified = true;
     }
   }
   return modified;
 }
  /** {@inheritDoc} */
  public boolean removeAll(float[] array) {
    Arrays.sort(array);

    boolean modified = false;
    TFloatIterator iter = iterator();
    while (iter.hasNext()) {
      if (Arrays.binarySearch(array, iter.next()) >= 0) {
        iter.remove();
        modified = true;
      }
    }
    return modified;
  }
Пример #6
0
 /** {@inheritDoc} */
 @Override
 public boolean retainAll(TFloatCollection collection) {
   if (this == collection) {
     return false;
   }
   boolean modified = false;
   TFloatIterator iter = iterator();
   while (iter.hasNext()) {
     if (!collection.contains(iter.next())) {
       iter.remove();
       modified = true;
     }
   }
   return modified;
 }