Package ghidra.util.datastruct
Class LongArrayList
java.lang.Object
ghidra.util.datastruct.LongArrayList
- All Implemented Interfaces:
Iterable<Long>,Collection<Long>,List<Long>,RandomAccess,SequencedCollection<Long>
An ArrayList for longs.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LongArrayListLongArrayList(long[] arr) Creates a new Long ArrayList using the values in the given arrayLongArrayList(LongArrayList list) Creates a new LongArrayList that is equivalent to the specified LongArrayList. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, long value) voidvoidadd(long value) booleanbooleanaddAll(int index, Collection<? extends Long> c) booleanaddAll(Collection<? extends Long> c) voidclear()booleanbooleancontainsAll(Collection<?> c) get(int index) longgetLongValue(int index) intbooleanisEmpty()iterator()intlastIndexOf(Object value) listIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) voidreverse()intsize()subList(int startIndex, int endIndex) Long[]toArray()Long[]<T> T[]toArray(T[] a) long[]long[]toLongArray(int start, int length) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
MIN_SIZE
public static final int MIN_SIZE- See Also:
-
-
Constructor Details
-
LongArrayList
public LongArrayList()Creates a new LongArrayList -
LongArrayList
public LongArrayList(long[] arr) Creates a new Long ArrayList using the values in the given array- Parameters:
arr- array of longs to initialize to.
-
LongArrayList
Creates a new LongArrayList that is equivalent to the specified LongArrayList. It creates a copy of the specified list.- Parameters:
list- the list to be copied.
-
-
Method Details
-
add
public void add(long value) -
add
-
add
-
add
public void add(int index, long value) -
remove
-
get
-
getLongValue
public long getLongValue(int index) -
set
-
clear
public void clear() -
size
public int size() -
toArray
-
toLongArray
public long[] toLongArray() -
toLongArray
public long[] toLongArray(int start, int length) -
reverse
public void reverse() -
remove
-
indexOf
-
subList
-
addAll
-
addAll
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<Long>- Specified by:
containsAllin interfaceList<Long>
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<Long>
-
listIterator
- Specified by:
listIteratorin interfaceList<Long>
-
listIterator
- Specified by:
listIteratorin interfaceList<Long>
-
removeAll
-
retainAll
-
toArray
public <T> T[] toArray(T[] a) -
toArray
-