|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.util.buffer.FastBooleanBuffer
public class FastBooleanBuffer
Fast, fast boolean buffer.
| Constructor Summary | |
|---|---|
FastBooleanBuffer()
Creates a new boolean buffer. |
|
FastBooleanBuffer(int size)
Creates a new boolean buffer, with a buffer capacity of
the specified size, in bytes. |
|
| Method Summary | |
|---|---|
FastBooleanBuffer |
append(boolean element)
Appends single boolean to buffer. |
FastBooleanBuffer |
append(boolean[] array)
Appends boolean array to buffer. |
FastBooleanBuffer |
append(boolean[] array,
int off,
int len)
Appends boolean array to buffer. |
FastBooleanBuffer |
append(FastBooleanBuffer buff)
Appends another fast buffer to this one. |
boolean[] |
array(int index)
Returns boolean inner array chunk at given index. |
void |
clear()
Resets the buffer content. |
boolean |
get(int index)
Returns boolean element at given index. |
int |
index()
Returns current index of inner boolean 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. |
boolean[] |
toArray()
Creates boolean array from buffered content. |
boolean[] |
toArray(int start,
int len)
Creates boolean 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 FastBooleanBuffer()
boolean buffer. The buffer capacity is
initially 1024 bytes, though its size increases if necessary.
public FastBooleanBuffer(int size)
boolean 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 FastBooleanBuffer append(boolean[] array,
int off,
int len)
boolean array to buffer.
public FastBooleanBuffer append(boolean[] array)
boolean array to buffer.
public FastBooleanBuffer append(boolean element)
boolean to buffer.
public FastBooleanBuffer append(FastBooleanBuffer buff)
public int size()
public boolean isEmpty()
public int index()
boolean array chunk.
Represents the index of last used inner array chunk.
public int offset()
public boolean[] array(int index)
boolean inner array chunk at given index.
May be used for iterating inner chunks in fast manner.
public void clear()
public boolean[] toArray()
boolean array from buffered content.
public boolean[] toArray(int start,
int len)
boolean subarray from buffered content.
public boolean get(int index)
boolean element at given index.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||