Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaDemianenko committed Dec 21, 2017
1 parent 77514cc commit 5ec1d54
Showing 1 changed file with 4 additions and 10 deletions.
Expand Up @@ -28,7 +28,7 @@ public class PrimitiveLongList implements PrimitiveLongCollection
{
private static final int DEFAULT_SIZE = 8;

private long[] elements = PrimitiveLongCollections.EMPTY_LONG_ARRAY;
private long[] elements;
private int size;

PrimitiveLongList()
Expand Down Expand Up @@ -111,20 +111,14 @@ private void ensureCapacity()
elements = Arrays.copyOf( elements, newCapacity );
}

private class PrimitiveLongListIterator implements PrimitiveLongIterator
private class PrimitiveLongListIterator extends PrimitiveLongCollections.PrimitiveLongBaseIterator
{
int cursor;

@Override
public boolean hasNext()
protected boolean fetchNext()
{
return cursor < size;
}

@Override
public long next()
{
return elements[cursor++];
return cursor < size && next( elements[cursor++] );
}
}
}

0 comments on commit 5ec1d54

Please sign in to comment.