public class IntArrayBuffer extends AbstractArrayBuffer
Usage Example:
IntArrayBuffer buf = new IntArrayBuffer(); Listresults = new ArrayList<>(); for (Object obj : listOfThingsToProcess) { for (Object x : obj.thingsThatShouldBecomeInts()) { buf.add(someCalculation(x)); } results.add(buf.toArray()); buf.clear(); }
Modifier and Type | Field and Description |
---|---|
protected int[] |
buf |
Constructor and Description |
---|
IntArrayBuffer(int initialSize) |
Modifier and Type | Method and Description |
---|---|
void |
add(int c) |
int[] |
getBuffer() |
int[] |
toArray() |
clear, ensureCapacity, isEmpty, length, setLength