com.google.sitebricks.util
Class BoundedDiscardingList<E>

java.lang.Object
  extended by 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.


Constructor Summary
BoundedDiscardingList(int maxlength)
           
 
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
 

Constructor Detail

BoundedDiscardingList

public BoundedDiscardingList(int maxlength)
Method Detail

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.