public class IntBuffer extends PersistentObject implements IntBufferConsumer
Modifier and Type | Field and Description |
---|---|
protected int |
capacity |
protected int[] |
elements |
protected IntArrayList |
list |
protected int |
size |
protected IntBufferConsumer |
target |
serialVersionUID
Constructor and Description |
---|
IntBuffer(IntBufferConsumer target,
int capacity)
Constructs and returns a new buffer with the given target.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int element)
Adds the specified element to the receiver.
|
void |
addAllOf(IntArrayList list)
Adds all elements of the specified list to the receiver.
|
void |
clear()
Sets the receiver's size to zero.
|
void |
flush()
Adds all internally buffered elements to the receiver's target, then resets the current buffer size to zero.
|
clone
protected IntBufferConsumer target
protected int[] elements
protected IntArrayList list
protected int capacity
protected int size
public IntBuffer(IntBufferConsumer target, int capacity)
target
- the target to flush to.capacity
- the number of points the buffer shall be capable of holding before overflowing and flushing to the target.public void add(int element)
element
- the element to add.public void addAllOf(IntArrayList list)
addAllOf
in interface IntBufferConsumer
list
- the list of which all elements shall be added.public void clear()
public void flush()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.