blob: a8e04ee81af02a2cc6bdda6c2380c6067ed9a51e (
about) (
plain)
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
|
package au.id.zancanaro.javacheck.state.queue;
import java.util.AbstractQueue;
import java.util.Iterator;
import java.util.LinkedList;
public class MyQueue<T> extends AbstractQueue<T> {
public final LinkedList<T> list;
public MyQueue() {
this.list = new LinkedList<>();
}
@SuppressWarnings("NullableProblems")
@Override
public Iterator<T> iterator() {
return list.iterator();
}
@Override
public int size() {
return list.size();
}
@Override
public boolean offer(T t) {
return list.offer(t);
}
@Override
public T poll() {
return list.poll();
}
@Override
public T peek() {
return list.peek();
}
}
|