T
- type of the list elementspublic class EvictingBoundedList<T> extends Object implements Iterable<T>, Serializable
The list by itself is serializable, but a full list can only be serialized if the values are also serializable.
Constructor and Description |
---|
EvictingBoundedList(EvictingBoundedList<T> other) |
EvictingBoundedList(int sizeLimit) |
EvictingBoundedList(int sizeLimit,
T defaultElement) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T t) |
void |
clear() |
T |
get(int index) |
T |
getDefaultElement() |
int |
getSizeLimit() |
boolean |
isDroppedIndex(int idx)
True if the given index is no longer kept in the evicting list; otherwise false.
|
boolean |
isEmpty() |
Iterator<T> |
iterator() |
T |
set(int index,
T element) |
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public EvictingBoundedList(int sizeLimit)
public EvictingBoundedList(EvictingBoundedList<T> other)
public EvictingBoundedList(int sizeLimit, T defaultElement)
public int size()
public boolean isEmpty()
public boolean add(T t)
public void clear()
public T get(int index)
public int getSizeLimit()
public T getDefaultElement()
public boolean isDroppedIndex(int idx)
idx
- index check wehther it has been droppedtrue
iff the given index is no longer kept in the evicting list; otherwise
false
.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.