com.google.sitebricks.util
Class BoundedDiscardingList<E>
java.lang.Object
com.google.sitebricks.util.BoundedDiscardingList<E>
public class BoundedDiscardingList<E>
- extends Object
Adds elements to a list, will remove oldest items
if the maximum specified capacity is exceeded.
TheadSafe & concurrent.
|
Method Summary |
boolean |
add(E item)
|
List<E> |
list()
Returns a snapshot of the list at *some* point in time. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoundedDiscardingList
public BoundedDiscardingList(int maxlength)
add
public boolean add(E item)
list
public List<E> list()
- Returns a snapshot of the list at *some* point in time.
Copyright © 2014. All rights reserved.