-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollection.java
More file actions
53 lines (32 loc) · 915 Bytes
/
Collection.java
File metadata and controls
53 lines (32 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.sun.source.util;
import java.util.Objects;
import java.util.function.Predicate;
public interface Collection<E> extends Iterable<E> {
int size();
boolean isEmpty();
boolean contains(Object arg0);
Iterator<E> iterator();
Object[] toArray();
<T> T[] toArray(T[] arg0);
boolean add(E arg0);
boolean remove(Object arg0);
boolean containsAll(Collection<?> arg0);
boolean addAll(Collection<? extends E> arg0);
boolean removeAll(Collection<?> arg0);
default boolean removeIf(Predicate<? super E> arg0) {
Objects.requireNonNull(arg0);
boolean arg1 = false;
Iterator<E> arg2 = this.iterator();
while (arg2.hasNext()) {
if (arg0.test(arg2.next())) {
arg2.remove();
arg1 = true;
}
}
return arg1;
}
boolean retainAll(Collection<?> arg0);
void clear();
boolean equals(Object arg0);
int hashCode();
}