MCPcopy Create free account
hub / github.com/ReadyTalk/avian / remove

Method remove

classpath/java/util/ArrayDeque.java:185–208  ·  view source on GitHub ↗
(Object o, boolean first)

Source from the content-addressed store, hash-verified

183 }
184
185 private boolean remove(Object o, boolean first) {
186 modCount++;
187
188 Iterator<T> it;
189 if (first) {
190 it = iterator();
191 } else {
192 it = descendingIterator();
193 }
194 while (it.hasNext()) {
195 T next = it.next();
196 if (next == null) {
197 if (o == null) {
198 it.remove();
199 return true;
200 }
201 } else if (next.equals(o)) {
202 it.remove();
203 return true;
204 }
205 }
206
207 return false;
208 }
209
210 @Override
211 public boolean removeFirstOccurrence(Object o) {

Callers 3

removeAllMethod · 0.95
removeFirstOccurrenceMethod · 0.95
removeLastOccurrenceMethod · 0.95

Calls 6

iteratorMethod · 0.95
descendingIteratorMethod · 0.95
hasNextMethod · 0.65
nextMethod · 0.65
removeMethod · 0.65
equalsMethod · 0.65

Tested by

no test coverage detected