oursland.collection
Class IntegerRingBuffer

java.lang.Object
  extended by oursland.collection.IntegerRingBuffer

public class IntegerRingBuffer
extends java.lang.Object

Author:
oursland

Field Summary
private  int[] buffer
           
private  int count
           
private  int next
           
private  int start
           
 
Constructor Summary
IntegerRingBuffer()
           
 
Method Summary
private  void expandBuffer(int size)
           
 int get(int index)
           
private  int nextBufferIndex(int current)
           
 int pop()
           
 void push(int ch)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

private int[] buffer

start

private int start

next

private int next

count

private int count
Constructor Detail

IntegerRingBuffer

public IntegerRingBuffer()
Method Detail

push

public void push(int ch)

pop

public int pop()

size

public int size()

get

public int get(int index)

nextBufferIndex

private int nextBufferIndex(int current)

expandBuffer

private void expandBuffer(int size)