public class ArrayLongList extends java.lang.Object implements LongList
Constructor and Description |
---|
ArrayLongList() |
ArrayLongList(int capacity) |
ArrayLongList(LongCollection xs) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAllLongs(long... xs) |
boolean |
addAllLongs(LongCollection xs) |
boolean |
addAllLongsAt(int index,
long... xs) |
boolean |
addAllLongsAt(int index,
LongCollection xs) |
boolean |
addLong(long x) |
void |
addLongAt(int index,
long x) |
int |
binarySearch(long x) |
void |
clear() |
boolean |
containsAllLongs(long... xs) |
boolean |
containsLong(long x) |
void |
forEachLong(java.util.function.LongConsumer consumer)
Performs the given action for each
long in this iterable. |
long |
getLong(int index) |
int |
indexOfLong(long x) |
boolean |
isEmpty() |
LongIterator |
iterator() |
int |
lastIndexOfLong(long x) |
LongListIterator |
listIterator(int index) |
static ArrayLongList |
of(long... contents) |
boolean |
removeAllLongs(long... xs) |
boolean |
removeLong(long x) |
long |
removeLongAt(int index) |
boolean |
removeLongsIf(java.util.function.LongPredicate filter) |
void |
replaceAllLongs(java.util.function.LongUnaryOperator operator) |
boolean |
retainAllLongs(long... xs) |
long |
setLong(int index,
long x) |
int |
size() |
void |
sortLongs() |
java.util.Spliterator.OfLong |
spliterator() |
LongList |
subList(int fromIndex,
int toIndex) |
long[] |
toLongArray()
Collect the
longs in this LongCollection into an long -array. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, addAll, addAll, contains, containsAll, copy, get, indexOf, lastIndexOf, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, sortLongs, toArray, toArray
containsAllLongs, containsAnyLongs, containsAnyLongs, forEach, from, from, longStream, once, once, parallelLongStream, removeAllLongs, retainAllLongs, sequence
public ArrayLongList()
public ArrayLongList(int capacity)
public ArrayLongList(LongCollection xs)
public static ArrayLongList of(long... contents)
of
in interface LongIterable
of
in interface LongList
LongList
of the given elements.public int size()
size
in interface java.util.Collection<java.lang.Long>
size
in interface java.util.List<java.lang.Long>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<java.lang.Long>
isEmpty
in interface java.util.List<java.lang.Long>
isEmpty
in interface LongCollection
isEmpty
in interface LongIterable
isEmpty
in interface LongList
public void clear()
clear
in interface java.util.Collection<java.lang.Long>
clear
in interface java.util.List<java.lang.Long>
clear
in interface LongCollection
clear
in interface LongIterable
clear
in interface LongList
public long[] toLongArray()
LongCollection
longs
in this LongCollection
into an long
-array.toLongArray
in interface LongCollection
public LongIterator iterator()
iterator
in interface java.lang.Iterable<java.lang.Long>
iterator
in interface java.util.Collection<java.lang.Long>
iterator
in interface java.util.List<java.lang.Long>
iterator
in interface LongIterable
public LongListIterator listIterator(int index)
listIterator
in interface java.util.List<java.lang.Long>
listIterator
in interface LongList
public LongList subList(int fromIndex, int toIndex)
public int binarySearch(long x)
binarySearch
in interface LongList
public void replaceAllLongs(java.util.function.LongUnaryOperator operator)
replaceAllLongs
in interface LongList
public long removeLongAt(int index)
removeLongAt
in interface LongList
public int lastIndexOfLong(long x)
lastIndexOfLong
in interface LongList
public int indexOfLong(long x)
indexOfLong
in interface LongList
public java.util.Spliterator.OfLong spliterator()
spliterator
in interface java.lang.Iterable<java.lang.Long>
spliterator
in interface java.util.Collection<java.lang.Long>
spliterator
in interface java.util.List<java.lang.Long>
spliterator
in interface LongCollection
spliterator
in interface LongIterable
spliterator
in interface LongList
public boolean addLong(long x)
addLong
in interface LongCollection
addLong
in interface LongList
public boolean addAllLongs(long... xs)
addAllLongs
in interface LongCollection
addAllLongs
in interface LongList
public boolean addAllLongs(LongCollection xs)
addAllLongs
in interface LongCollection
addAllLongs
in interface LongList
public boolean addAllLongsAt(int index, long... xs)
addAllLongsAt
in interface LongList
public boolean addAllLongsAt(int index, LongCollection xs)
addAllLongsAt
in interface LongList
public boolean containsAllLongs(long... xs)
containsAllLongs
in interface LongIterable
public boolean removeLong(long x)
removeLong
in interface LongIterable
public boolean containsLong(long x)
containsLong
in interface LongIterable
public boolean removeAllLongs(long... xs)
removeAllLongs
in interface LongIterable
public boolean retainAllLongs(long... xs)
retainAllLongs
in interface LongIterable
public boolean removeLongsIf(java.util.function.LongPredicate filter)
removeLongsIf
in interface LongIterable
public void forEachLong(java.util.function.LongConsumer consumer)
LongIterable
long
in this iterable.forEachLong
in interface LongIterable