de.gulden.util.nio
Class RingFloat
java.lang.Object
de.gulden.util.nio.FifoFloat
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
protected float[] buffer
pos
protected int pos
RingFloat
public RingFloat()
RingFloat
public RingFloat(int initialCapacity)
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)