public class ShortArrayBuffer extends AbstractArrayBuffer implements Iterable<Integer>
Usage Example:
ShortArrayBuffer buf = new ShortArrayBuffer(); Listresults = new ArrayList<>(); for (Object obj : listOfThingsToProcess) { for (Object x : obj.thingsThatShouldBecomeShorts()) { buf.add(someCalculation(x)); } results.add(buf.toArray()); buf.clear(); }
| Constructor and Description |
|---|
ShortArrayBuffer() |
ShortArrayBuffer(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(short s) |
void |
addAll(short[] values,
int valuesLength) |
short |
get(int i) |
PrimitiveIterator.OfInt |
iterator() |
Object |
peek() |
Object |
pop() |
short[] |
toArray() |
clear, ensureCapacity, isEmpty, length, setLengthclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ShortArrayBuffer()
public ShortArrayBuffer(int initialSize)
public short get(int i)
public void add(short s)
public void addAll(short[] values,
int valuesLength)
public Object peek()
public Object pop()
public short[] toArray()
public PrimitiveIterator.OfInt iterator()