|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.util.buffer.FastIntBuffer
public class FastIntBuffer
Fast, fast int buffer.
| Constructor Summary | |
|---|---|
FastIntBuffer()
Creates a new int buffer. |
|
FastIntBuffer(int size)
Creates a new int buffer, with a buffer capacity of
the specified size, in bytes. |
|
| Method Summary | |
|---|---|
FastIntBuffer |
append(FastIntBuffer buff)
Appends another fast buffer to this one. |
FastIntBuffer |
append(int element)
Appends single int to buffer. |
FastIntBuffer |
append(int[] array)
Appends int array to buffer. |
FastIntBuffer |
append(int[] array,
int off,
int len)
Appends int array to buffer. |
int[] |
array(int index)
Returns int inner array chunk at given index. |
void |
clear()
Resets the buffer content. |
int |
get(int index)
Returns int element at given index. |
int |
index()
Returns current index of inner int array chunk. |
boolean |
isEmpty()
Tests if this buffer has no elements. |
int |
offset()
Returns the offset of last used element in current inner array chunk. |
int |
size()
Returns buffer size. |
int[] |
toArray()
Creates int array from buffered content. |
int[] |
toArray(int start,
int len)
Creates int subarray from buffered content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FastIntBuffer()
int buffer. The buffer capacity is
initially 1024 bytes, though its size increases if necessary.
public FastIntBuffer(int size)
int buffer, with a buffer capacity of
the specified size, in bytes.
size - the initial size.
java.lang.IllegalArgumentException - if size is negative.| Method Detail |
|---|
public FastIntBuffer append(int[] array,
int off,
int len)
int array to buffer.
public FastIntBuffer append(int[] array)
int array to buffer.
public FastIntBuffer append(int element)
int to buffer.
public FastIntBuffer append(FastIntBuffer buff)
public int size()
public boolean isEmpty()
public int index()
int array chunk.
Represents the index of last used inner array chunk.
public int offset()
public int[] array(int index)
int inner array chunk at given index.
May be used for iterating inner chunks in fast manner.
public void clear()
public int[] toArray()
int array from buffered content.
public int[] toArray(int start,
int len)
int subarray from buffered content.
public int get(int index)
int element at given index.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||