return result;
}
public ShortIterator iterator() {
if (size == 0)
return new ShortIterator() {
public boolean hasNext()
{ return false; }
public short next()
{ Exceptions.endOfIterator(); throw new RuntimeException(); }
public void remove()
{ Exceptions.noElementToRemove(); }
};
return new ShortIterator() {
int nextLongIndex = nextLongIndex(0);
int nextBitIndex = nextLongIndex < data.length ? nextBitIndex(nextLongIndex, 0) : 0;
int lastValue = -1;
int nextLongIndex(int index) {