예제 #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;
  }
예제 #3
0
 /** {@inheritDoc} */
 public void sort(int fromIndex, int toIndex) {
   Arrays.sort(_data, fromIndex, toIndex);
 }
예제 #4
0
 /** {@inheritDoc} */
 public void sort() {
   Arrays.sort(_data, 0, _pos);
 }
 /** {@inheritDoc} */
 public void sort(int fromIndex, int toIndex) {
   TFloatList tmp = subList(fromIndex, toIndex);
   float[] vals = tmp.toArray();
   Arrays.sort(vals);
   set(fromIndex, vals);
 }