Package ghidra.util.datastruct
Class LongArrayList
- java.lang.Object
-
- ghidra.util.datastruct.LongArrayList
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Long>
,java.util.Collection<java.lang.Long>
,java.util.List<java.lang.Long>
public class LongArrayList extends java.lang.Object implements java.util.List<java.lang.Long>
An ArrayList for longs.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MIN_SIZE
-
Constructor Summary
Constructors Constructor Description LongArrayList()
Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, long value)
void
add(int index, java.lang.Long value)
void
add(long value)
boolean
add(java.lang.Long value)
boolean
addAll(int index, java.util.Collection<? extends java.lang.Long> c)
boolean
addAll(java.util.Collection<? extends java.lang.Long> c)
void
clear()
boolean
contains(java.lang.Object value)
boolean
containsAll(java.util.Collection<?> c)
java.lang.Long
get(int index)
long
getLongValue(int index)
int
indexOf(java.lang.Object value)
boolean
isEmpty()
java.util.Iterator<java.lang.Long>
iterator()
int
lastIndexOf(java.lang.Object value)
java.util.ListIterator<java.lang.Long>
listIterator()
java.util.ListIterator<java.lang.Long>
listIterator(int index)
java.lang.Long
remove(int index)
boolean
remove(java.lang.Object value)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
void
reverse()
java.lang.Long
set(int index, java.lang.Long value)
int
size()
java.util.List<java.lang.Long>
subList(int startIndex, int endIndex)
java.lang.Long[]
toArray()
java.lang.Long[]
toArray(java.lang.Long[] a)
<T> T[]
toArray(T[] a)
long[]
toLongArray()
long[]
toLongArray(int start, int length)
-
-
-
Field Detail
-
MIN_SIZE
public static final int MIN_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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
public LongArrayList(LongArrayList list)
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 Detail
-
add
public void add(long value)
-
add
public boolean add(java.lang.Long value)
- Specified by:
add
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
add
in interfacejava.util.List<java.lang.Long>
- See Also:
List.add(java.lang.Object)
-
add
public void add(int index, java.lang.Long value)
- Specified by:
add
in interfacejava.util.List<java.lang.Long>
- See Also:
List.add(int, java.lang.Object)
-
add
public void add(int index, long value)
-
remove
public java.lang.Long remove(int index)
- Specified by:
remove
in interfacejava.util.List<java.lang.Long>
-
get
public java.lang.Long get(int index)
- Specified by:
get
in interfacejava.util.List<java.lang.Long>
- See Also:
List.get(int)
-
getLongValue
public long getLongValue(int index)
-
set
public java.lang.Long set(int index, java.lang.Long value)
- Specified by:
set
in interfacejava.util.List<java.lang.Long>
- See Also:
LongArrayList.LongArraySubList.set(int, long)
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
clear
in interfacejava.util.List<java.lang.Long>
- See Also:
List.clear()
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
size
in interfacejava.util.List<java.lang.Long>
- See Also:
List.size()
-
toArray
public java.lang.Long[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
toArray
in interfacejava.util.List<java.lang.Long>
- See Also:
List.toArray()
-
toLongArray
public long[] toLongArray()
-
toLongArray
public long[] toLongArray(int start, int length)
-
reverse
public void reverse()
-
remove
public boolean remove(java.lang.Object value)
- Specified by:
remove
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
remove
in interfacejava.util.List<java.lang.Long>
-
indexOf
public int indexOf(java.lang.Object value)
- Specified by:
indexOf
in interfacejava.util.List<java.lang.Long>
-
subList
public java.util.List<java.lang.Long> subList(int startIndex, int endIndex)
- Specified by:
subList
in interfacejava.util.List<java.lang.Long>
-
addAll
public boolean addAll(java.util.Collection<? extends java.lang.Long> c)
- Specified by:
addAll
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
addAll
in interfacejava.util.List<java.lang.Long>
-
addAll
public boolean addAll(int index, java.util.Collection<? extends java.lang.Long> c)
- Specified by:
addAll
in interfacejava.util.List<java.lang.Long>
-
contains
public boolean contains(java.lang.Object value)
- Specified by:
contains
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
contains
in interfacejava.util.List<java.lang.Long>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
containsAll
in interfacejava.util.List<java.lang.Long>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
isEmpty
in interfacejava.util.List<java.lang.Long>
-
iterator
public java.util.Iterator<java.lang.Long> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Long>
- Specified by:
iterator
in interfacejava.util.List<java.lang.Long>
-
lastIndexOf
public int lastIndexOf(java.lang.Object value)
- Specified by:
lastIndexOf
in interfacejava.util.List<java.lang.Long>
-
listIterator
public java.util.ListIterator<java.lang.Long> listIterator()
- Specified by:
listIterator
in interfacejava.util.List<java.lang.Long>
-
listIterator
public java.util.ListIterator<java.lang.Long> listIterator(int index)
- Specified by:
listIterator
in interfacejava.util.List<java.lang.Long>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
removeAll
in interfacejava.util.List<java.lang.Long>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
retainAll
in interfacejava.util.List<java.lang.Long>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
toArray
in interfacejava.util.List<java.lang.Long>
-
toArray
public java.lang.Long[] toArray(java.lang.Long[] a)
-
-