-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathList.java
More file actions
36 lines (31 loc) · 827 Bytes
/
List.java
File metadata and controls
36 lines (31 loc) · 827 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
public interface List<E> extends Iterable<E> {
public void add(E obj);
public void add(int index, E obj);
public boolean remove(E obj);
public boolean remove(int index);
public int removeAll(E obj);
public E get(int index);
public E set(int index, E obj);
public E first();
public E last();
public int firstIndex(E obj);
public int lastIndex(E obj);
public int size();
public boolean isEmpty();
public boolean contains(E obj);
public void clear();
static int totalCount(String s, ArrayList<List<String>> L) {
int Fcount = 0;
for (int i = 0; i < L.size(); i++) {
List<String> List2count = L.get(i);
for (int j = 0; j < List2count.size(); j++) {
if(List2count.contains(s)) {
++Fcount;
}
}
}
return Fcount;
}
public int replaceAll(E e, E f);
public List<E> reverse();
}