de.gulden.util.nio

Class RingFloat

public class RingFloat extends FifoFloat

Array-based ringbuffer implementation. A ringbuffer does not change in size dynamically, data that first has been put into the buffer willl be overwritten by new data once the maximum ringbuffer capacity has been reached. A program can ensure a minimum buffer size by calling ensureSize(), decreasing of buffer size is not possible.

Version: 0.3

Author: Jens Gulden

Field Summary
protected float[]buffer
protected intpos
Constructor Summary
RingFloat()
RingFloat(int initialCapacity)
Method Summary
voidensureCapacity(int size)
floatget(int diff)
voidput(FloatBuffer buf)
Only the remaining buffer content will be used by the fifo-queue.
voidput(float[] f)
voidput(float[] f, int offset, int length)
voidput(float f)

Field Detail

buffer

protected float[] buffer

pos

protected int pos

Constructor Detail

RingFloat

public RingFloat()

RingFloat

public RingFloat(int initialCapacity)

Method Detail

ensureCapacity

public void ensureCapacity(int size)

get

public float get(int diff)

put

public void put(FloatBuffer buf)
Only the remaining buffer content will be used by the fifo-queue.

put

public void put(float[] f)

put

public void put(float[] f, int offset, int length)

put

public void put(float f)