public static class DoubleLists.UnmodifiableRandomAccessList extends DoubleLists.UnmodifiableList implements java.util.RandomAccess, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected DoubleCollection |
collection |
list| Modifier | Constructor and Description |
|---|---|
protected |
UnmodifiableRandomAccessList(DoubleList l) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(double k)
Ensures that this collection contains the specified element (optional operation).
|
boolean |
add(java.lang.Double k)
Deprecated.
|
boolean |
addAll(java.util.Collection<? extends java.lang.Double> c) |
boolean |
addAll(DoubleCollection c)
Adds all elements of the given type-specific collection to this collection.
|
void |
clear() |
boolean |
contains(double o)
Returns
true if this collection contains the specified element. |
boolean |
contains(java.lang.Object k)
Deprecated.
|
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsAll(DoubleCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
it.unimi.dsi.fastutil.doubles.DoubleIterator |
doubleIterator()
Returns a primitive iterator on the elements of this collection.
|
java.util.stream.DoubleStream |
doubleParallelStream()
Return a parallel primitive stream over the elements, performing widening casts if needed.
|
it.unimi.dsi.fastutil.doubles.DoubleSpliterator |
doubleSpliterator()
Returns a primitive spliterator on the elements of this collection.
|
java.util.stream.DoubleStream |
doubleStream()
Return a primitive stream over the elements, performing widening casts if needed.
|
void |
forEach(java.util.function.DoubleConsumer action)
Performs the given action for each element of this type-specific
Iterable
until all elements have been processed or the action throws an
exception. |
boolean |
isEmpty() |
java.util.stream.Stream<java.lang.Double> |
parallelStream()
Deprecated.
|
boolean |
rem(double k)
Removes a single instance of the specified element from this
collection, if it is present (optional operation).
|
boolean |
remove(java.lang.Object k)
Deprecated.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(DoubleCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeIf(java.util.function.DoublePredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(DoubleCollection c)
Retains in this collection only elements from the given type-specific collection.
|
int |
size() |
it.unimi.dsi.fastutil.doubles.DoubleSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.util.stream.Stream<java.lang.Double> |
stream()
Deprecated.
|
DoubleList |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
java.lang.Object[] |
toArray() |
double[] |
toArray(double[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
|
<T> T[] |
toArray(T[] a) |
double[] |
toDoubleArray()
Returns a primitive type array containing the items of this collection.
|
double[] |
toDoubleArray(double[] a)
Deprecated.
|
java.lang.String |
toString() |
add, add, addAll, addAll, addAll, addAll, addElements, addElements, compareTo, equals, get, getDouble, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeDouble, removeElements, replaceAll, replaceAll, set, set, setElements, setElements, setElements, size, sort, sort, unstableSort, unstableSortclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, contains, of, of, of, of, of, remove, replaceAll, spliteratoraddAll, clear, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArrayaddAll, contains, containsAll, doubleIterator, doubleParallelStream, doubleSpliterator, doubleStream, parallelStream, rem, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toDoubleArray, toDoubleArrayforEach, forEach, forEachprotected final DoubleCollection collection
protected UnmodifiableRandomAccessList(DoubleList l)
public DoubleList subList(int from, int to)
DoubleListfrom, inclusive, to the index to, exclusive.subList in interface DoubleListsubList in interface java.util.List<java.lang.Double>subList in class DoubleLists.UnmodifiableListList.subList(int,int)public boolean add(double k)
DoubleCollectionadd in interface DoubleCollectionCollection.add(Object)public boolean rem(double k)
DoubleCollectionNote that this method should be called remove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove().
rem in interface DoubleCollectionCollection.remove(Object)public int size()
size in interface java.util.Collection<java.lang.Double>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Double>public boolean contains(double o)
DoubleCollectiontrue if this collection contains the specified element.contains in interface DoubleCollectionCollection.contains(Object)public it.unimi.dsi.fastutil.doubles.DoubleSpliterator spliterator()
DoubleCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
spliterator in interface DoubleCollectionspliterator in interface DoubleIterablespliterator in interface java.lang.Iterable<java.lang.Double>spliterator in interface java.util.Collection<java.lang.Double>@Deprecated public java.util.stream.Stream<java.lang.Double> stream()
DoubleCollectionstream in interface DoubleCollectionstream in interface java.util.Collection<java.lang.Double>@Deprecated public java.util.stream.Stream<java.lang.Double> parallelStream()
DoubleCollectionparallelStream in interface DoubleCollectionparallelStream in interface java.util.Collection<java.lang.Double>public void clear()
clear in interface java.util.Collection<java.lang.Double>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<java.lang.Double>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Double>public void forEach(java.util.function.DoubleConsumer action)
DoubleIterableIterable
until all elements have been processed or the action throws an
exception.forEach in interface DoubleIterableaction - the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Double>public boolean addAll(java.util.Collection<? extends java.lang.Double> c)
addAll in interface java.util.Collection<java.lang.Double>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Double>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Double>public boolean removeIf(java.util.function.DoublePredicate filter)
DoubleCollectionremoveIf in interface DoubleCollectionfilter - a predicate which returns true for elements to be
removed.true if any elements were removed.Collection.removeIf(java.util.function.Predicate)@Deprecated public boolean add(java.lang.Double k)
DoubleCollectionadd in interface DoubleCollectionadd in interface java.util.Collection<java.lang.Double>@Deprecated public boolean contains(java.lang.Object k)
DoubleCollectioncontains in interface DoubleCollectioncontains in interface java.util.Collection<java.lang.Double>@Deprecated public boolean remove(java.lang.Object k)
DoubleCollectionremove in interface DoubleCollectionremove in interface java.util.Collection<java.lang.Double>public double[] toDoubleArray()
DoubleCollectiontoDoubleArray in interface DoubleCollectionCollection.toArray()@Deprecated public double[] toDoubleArray(double[] a)
DoubleCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toDoubleArray in interface DoubleCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public double[] toArray(double[] a)
DoubleCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray in interface DoubleCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean containsAll(DoubleCollection c)
DoubleCollectioncontainsAll in interface DoubleCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean addAll(DoubleCollection c)
DoubleCollectionaddAll in interface DoubleCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean removeAll(DoubleCollection c)
DoubleCollectionremoveAll in interface DoubleCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(DoubleCollection c)
DoubleCollectionretainAll in interface DoubleCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public it.unimi.dsi.fastutil.doubles.DoubleIterator doubleIterator()
DoubleCollection
This method is identical to DoubleCollection.iterator(), as the type-specific
iterator is already compatible with the JDK's primitive iterators.
It only exists for compatibility with the other primitive types' Collections
that have use for widened iterators.
doubleIterator in interface DoubleCollectiondoubleIterator in interface DoubleIterablepublic it.unimi.dsi.fastutil.doubles.DoubleSpliterator doubleSpliterator()
DoubleCollection
This method is identical to DoubleCollection.spliterator(), as the type-specific
spliterator is already compatible with the JDK's primitive spliterators.
It only exists for compatibility with the other primitive types' Collections
that have use for widened spliterators.
doubleSpliterator in interface DoubleCollectiondoubleSpliterator in interface DoubleIterablepublic java.util.stream.DoubleStream doubleStream()
DoubleCollectiondoubleStream in interface DoubleCollectionCollection.stream(),
IntStreampublic java.util.stream.DoubleStream doubleParallelStream()
DoubleCollectiondoubleParallelStream in interface DoubleCollectionCollection.parallelStream(),
IntStreampublic java.lang.String toString()
toString in class java.lang.Object