org.apache.solr.logging
Class CircularList<T>

java.lang.Object
  extended by org.apache.solr.logging.CircularList<T>
All Implemented Interfaces:
Iterable<T>

public class CircularList<T>
extends Object
implements Iterable<T>

FIFO Circular List. Once the size is reached, it will overwrite previous entries


Constructor Summary
CircularList(int size)
           
 
Method Summary
 void add(T o)
           
 void clear()
           
 T get(int index)
           
 int getBufferSize()
           
 boolean isEmpty()
           
 Iterator<T> iterator()
           
 void resize(int newsize)
           
 int size()
           
 List<T> toList()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CircularList

public CircularList(int size)
Method Detail

resize

public void resize(int newsize)

isEmpty

public boolean isEmpty()

size

public int size()

getBufferSize

public int getBufferSize()

get

public T get(int index)

add

public void add(T o)

clear

public void clear()

toList

public List<T> toList()

toString

public String toString()
Overrides:
toString in class Object

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.