de.gulden.util.nio
Class RingFloat

java.lang.Object
  extended by de.gulden.util.nio.FifoFloat
      extended by de.gulden.util.nio.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  int pos
           
 
Fields inherited from class de.gulden.util.nio.FifoFloat
allocationSize, appendable, avail, DEFAULT_ALLOCATION_SIZE, fifo
 
Constructor Summary
RingFloat()
           
RingFloat(int initialCapacity)
           
 
Method Summary
 void ensureCapacity(int size)
           
 float get(int diff)
           
 void put(float f)
           
 void put(float[] f)
           
 void put(float[] f, int offset, int length)
           
 void put(java.nio.FloatBuffer buf)
          Only the remaining buffer content will be used by the fifo-queue.
 
Methods inherited from class de.gulden.util.nio.FifoFloat
available, get, get, get, getAppendable, isEmpty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
Overrides:
ensureCapacity in class FifoFloat

put

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

Overrides:
put in class FifoFloat

put

public void put(float[] f)
Overrides:
put in class FifoFloat

put

public void put(float[] f,
                int offset,
                int length)
Overrides:
put in class FifoFloat

put

public void put(float f)
Overrides:
put in class FifoFloat

get

public float get(int diff)