megamek.common.util
Class CircularIntegerBuffer

java.lang.Object
  extended by megamek.common.util.CircularIntegerBuffer

public class CircularIntegerBuffer
extends java.lang.Object


Constructor Summary
CircularIntegerBuffer(int size)
          Creates the new buffer
 
Method Summary
 void clear()
          Clears the buffer
 int length()
          Returns the length of this buffer
 void push(int value)
          Adds new value
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CircularIntegerBuffer

public CircularIntegerBuffer(int size)
Creates the new buffer

Parameters:
size - required size
Method Detail

length

public int length()
Returns the length of this buffer

Returns:
length of this buffer

clear

public void clear()
Clears the buffer


push

public void push(int value)
Adds new value

Parameters:
value - value to add

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object