Class LongArrayList
java.lang.Object
cz.drg.pregrouper.process.fileRead.LongArrayList
-
Constructor Summary
ConstructorsConstructorDescriptionLongArrayList(int maximumSize) Creates a new LongArrayList with a backing array that can only grow up to maximumSize. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(long value) Appends a value to the end of the array.longget(int index) intlength()voidreset()Clears the backing array and resets the lastFilledIndex to -1.voidreset(int maximumSize) Clears the backing array and resets the lastFilledIndex to -1, also allows setting of the maximum permitted length of backing array.long[]values()Provides copy of the backing array truncated to only the filled elements.
-
Constructor Details
-
LongArrayList
public LongArrayList() -
LongArrayList
public LongArrayList(int maximumSize) Creates a new LongArrayList with a backing array that can only grow up to maximumSize.- Parameters:
maximumSize-
-
-
Method Details
-
append
public void append(long value) Appends a value to the end of the array.- Parameters:
value-
-
get
public long get(int index) -
values
public long[] values()Provides copy of the backing array truncated to only the filled elements. -
reset
public void reset(int maximumSize) Clears the backing array and resets the lastFilledIndex to -1, also allows setting of the maximum permitted length of backing array. -
reset
public void reset()Clears the backing array and resets the lastFilledIndex to -1. -
length
public int length()
-