public class LruQueue<E> extends AbstractQueue<E> implements Queue<E>, Serializable
| 限定符和类型 | 字段和说明 |
|---|---|
private Queue<E> |
delegate |
private AtomicInteger |
index |
private Map<Integer,E> |
keys |
private int |
maxSize |
private static long |
serialVersionUID |
| 限定符和类型 | 方法和说明 |
|---|---|
Iterator<E> |
iterator() |
static void |
main(String[] args) |
boolean |
offer(E e) |
protected void |
onEviction(E e) |
E |
peek() |
E |
poll() |
int |
size() |
String |
toString() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArrayprivate static final long serialVersionUID
private final int maxSize
private final AtomicInteger index
public Iterator<E> iterator()
iterator 在接口中 Iterable<E>iterator 在接口中 Collection<E>iterator 在类中 AbstractCollection<E>public int size()
size 在接口中 Collection<E>size 在类中 AbstractCollection<E>protected void onEviction(E e)
public String toString()
toString 在类中 AbstractCollection<E>public static void main(String[] args)
Copyright © 2020. All rights reserved.