co.uk.sentinelweb.ps
Class RingBuffer<Item>

java.lang.Object
  extended by co.uk.sentinelweb.ps.RingBuffer<Item>
All Implemented Interfaces:
java.lang.Iterable<Item>

public class RingBuffer<Item>
extends java.lang.Object
implements java.lang.Iterable<Item>


Constructor Summary
RingBuffer(int capacity)
           
 
Method Summary
 void enqueue(Item item)
           
 Item get(int i)
           
 boolean isEmpty()
           
 java.util.Iterator<Item> iterator()
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RingBuffer

public RingBuffer(int capacity)
Method Detail

isEmpty

public boolean isEmpty()

size

public int size()

enqueue

public void enqueue(Item item)

iterator

public java.util.Iterator<Item> iterator()
Specified by:
iterator in interface java.lang.Iterable<Item>

get

public Item get(int i)