Beispiel #1
0
  /** {@inheritDoc} */
  public boolean retainAll(byte[] array) {
    boolean changed = false;
    Arrays.sort(array);
    byte[] data = _data;

    for (int i = data.length; i-- > 0; ) {
      if (Arrays.binarySearch(array, data[i]) < 0) {
        remove(i, 1);
        changed = true;
      }
    }
    return changed;
  }
  /** {@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;
  }