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
-
Constructor Summary
ConstructorDescriptionCreates 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 TypeMethodDescriptionvoid
add
(int index, long value) void
void
add
(long value) boolean
boolean
addAll
(int index, Collection<? extends Long> c) boolean
addAll
(Collection<? extends Long> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) get
(int index) long
getLongValue
(int index) int
boolean
isEmpty()
iterator()
int
lastIndexOf
(Object value) listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) void
reverse()
int
size()
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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
containsAll
in interfaceCollection<Long>
- Specified by:
containsAll
in interfaceList<Long>
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<Long>
-
listIterator
- Specified by:
listIterator
in interfaceList<Long>
-
listIterator
- Specified by:
listIterator
in interfaceList<Long>
-
removeAll
-
retainAll
-
toArray
public <T> T[] toArray(T[] a) -
toArray
-