@Test public void testRemoveIf() { DoubleList list = new DoubleList(); list.removeIf(o -> o < 7); assertThat(list.toArray()).isEmpty(); list.add(10d); list.add(5d); list.removeIf(o -> o < 7); assertThat(list.toArray()).containsExactly(10d); }
public boolean removeIf(DoublePredicate filter) { java.util.Objects.requireNonNull(filter); boolean removed = false; int i = 0; while (i < _limit) { if (filter.test(_array[i])) { remove(i); removed = true; } else { i++; } } return removed; }
DoubleList { public boolean removeIf(DoublePredicate filter) { java.util.Objects.requireNonNull(filter); boolean removed = false; int i = 0; while (i < _limit) { if (filter.test(_array[i])) { remove(i); removed = true; } else { i++; } } return removed; } }
DoubleList { public boolean removeIf(DoublePredicate filter) { java.util.Objects.requireNonNull(filter); boolean removed = false; int i = 0; while (i < _limit) { if (filter.test(_array[i])) { remove(i); removed = true; } else { i++; } } return removed; } DoubleList();  DoubleList(final int initialCapacity);  DoubleList(final DoubleList list);  DoubleList(final int initialCapacity, double fillvalue); }
DoubleList { public boolean removeIf(DoublePredicate filter) { java.util.Objects.requireNonNull(filter); boolean removed = false; int i = 0; while (i < _limit) { if (filter.test(_array[i])) { remove(i); removed = true; } else { i++; } } return removed; } DoubleList();  DoubleList(final int initialCapacity);  DoubleList(final DoubleList list);  DoubleList(final int initialCapacity, double fillvalue); void add(final int index, final double value); boolean add(final double value); boolean addAll(final DoubleList c); boolean addAll(final int index, final DoubleList c); void clear(); boolean contains(final double o); boolean containsAll(final DoubleList c); @Override boolean equals(final Object o); double get(final int index); @Override int hashCode(); int indexOf(final double o); boolean isEmpty(); int lastIndexOf(final double o); double remove(final int index); boolean removeValue(final double o); boolean removeAll(final DoubleList c); boolean retainAll(final DoubleList c); double set(final int index, final double element); int size(); double[] toArray(); double[] toArray(final double[] a); DoubleStream stream(); void replaceAll(DoubleUnaryOperator operator); void sort(); Spliterator.OfDouble spliterator(); boolean removeIf(DoublePredicate filter); void forEach(DoubleConsumer action); }
DoubleList { public boolean removeIf(DoublePredicate filter) { java.util.Objects.requireNonNull(filter); boolean removed = false; int i = 0; while (i < _limit) { if (filter.test(_array[i])) { remove(i); removed = true; } else { i++; } } return removed; } DoubleList();  DoubleList(final int initialCapacity);  DoubleList(final DoubleList list);  DoubleList(final int initialCapacity, double fillvalue); void add(final int index, final double value); boolean add(final double value); boolean addAll(final DoubleList c); boolean addAll(final int index, final DoubleList c); void clear(); boolean contains(final double o); boolean containsAll(final DoubleList c); @Override boolean equals(final Object o); double get(final int index); @Override int hashCode(); int indexOf(final double o); boolean isEmpty(); int lastIndexOf(final double o); double remove(final int index); boolean removeValue(final double o); boolean removeAll(final DoubleList c); boolean retainAll(final DoubleList c); double set(final int index, final double element); int size(); double[] toArray(); double[] toArray(final double[] a); DoubleStream stream(); void replaceAll(DoubleUnaryOperator operator); void sort(); Spliterator.OfDouble spliterator(); boolean removeIf(DoublePredicate filter); void forEach(DoubleConsumer action);  }