Class UnmodifiableDoubleList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableDoubleCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableDoubleList
-
- All Implemented Interfaces:
java.io.Serializable
,MutableDoubleCollection
,DoubleIterable
,DoubleList
,MutableDoubleList
,OrderedDoubleIterable
,ReversibleDoubleIterable
,PrimitiveIterable
public class UnmodifiableDoubleList extends AbstractUnmodifiableDoubleCollection implements MutableDoubleList
This file was automatically generated from template file unmodifiablePrimitiveList.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description UnmodifiableDoubleList(MutableDoubleList list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAllAtIndex(int index, double... source)
boolean
addAllAtIndex(int index, DoubleIterable source)
void
addAtIndex(int index, double element)
LazyDoubleIterable
asReversed()
MutableDoubleList
asSynchronized()
MutableDoubleList
asUnmodifiable()
int
binarySearch(double value)
<V> MutableList<V>
collect(DoubleToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.<V> MutableList<V>
collectWithIndex(DoubleIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.<V,R extends java.util.Collection<V>>
RcollectWithIndex(DoubleIntToObjectFunction<? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.MutableDoubleList
distinct()
double
dotProduct(DoubleList list)
boolean
equals(java.lang.Object otherList)
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex(DoubleIntProcedure procedure)
double
get(int index)
double
getFirst()
double
getLast()
private MutableDoubleList
getMutableDoubleList()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf(double value)
<T> T
injectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T,? extends T> function)
int
lastIndexOf(double value)
MutableDoubleList
newEmpty()
Creates a new empty mutable version of the same List type.MutableDoubleList
reject(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.MutableDoubleList
rejectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableDoubleCollection>
RrejectWithIndex(DoubleIntPredicate predicate, R target)
Returns a new MutableDoubleCollection excluding all elements with corresponding indexes matching the specified predicate.double
removeAtIndex(int index)
MutableDoubleList
reverseThis()
MutableDoubleList
select(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.MutableDoubleList
selectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList including all elements with corresponding indexes matching the specified predicate.<R extends MutableDoubleCollection>
RselectWithIndex(DoubleIntPredicate predicate, R target)
Returns a new MutableDoubleCollection including all elements with corresponding indexes matching the specified predicate.double
set(int index, double element)
MutableDoubleList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).MutableDoubleList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).java.util.Spliterator.OfDouble
spliterator()
MutableDoubleList
subList(int fromIndex, int toIndex)
ImmutableDoubleList
toImmutable()
Returns an immutable copy of this list.MutableDoubleList
toReversed()
UnmodifiableDoubleList
with(double element)
UnmodifiableDoubleList
withAll(DoubleIterable elements)
UnmodifiableDoubleList
without(double element)
UnmodifiableDoubleList
withoutAll(DoubleIterable elements)
<T> MutableList<DoubleObjectPair<T>>
zip(java.lang.Iterable<T> iterable)
Returns aMutableList
formed from thisMutableDoubleList
and aListIterable
by combining corresponding elements in pairs.MutableList<DoubleDoublePair>
zipDouble(DoubleIterable iterable)
Returns aMutableList
formed from thisMutableDoubleList
and anotherDoubleList
by combining corresponding elements in pairs.-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableDoubleCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, doubleIterator, each, getDoubleCollection, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.DoubleList
forEachInBoth, primitiveParallelStream, primitiveStream
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableDoubleCollection
add, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableDoubleList
shuffleThis, sortThis, sortThisBy, sortThisBy, swap, tap
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnmodifiableDoubleList
public UnmodifiableDoubleList(MutableDoubleList list)
-
-
Method Detail
-
getMutableDoubleList
private MutableDoubleList getMutableDoubleList()
-
get
public double get(int index)
- Specified by:
get
in interfaceDoubleList
-
getFirst
public double getFirst()
- Specified by:
getFirst
in interfaceOrderedDoubleIterable
-
getLast
public double getLast()
- Specified by:
getLast
in interfaceReversibleDoubleIterable
-
indexOf
public int indexOf(double value)
- Specified by:
indexOf
in interfaceOrderedDoubleIterable
-
lastIndexOf
public int lastIndexOf(double value)
- Specified by:
lastIndexOf
in interfaceDoubleList
-
addAtIndex
public void addAtIndex(int index, double element)
- Specified by:
addAtIndex
in interfaceMutableDoubleList
-
addAllAtIndex
public boolean addAllAtIndex(int index, double... source)
- Specified by:
addAllAtIndex
in interfaceMutableDoubleList
-
addAllAtIndex
public boolean addAllAtIndex(int index, DoubleIterable source)
- Specified by:
addAllAtIndex
in interfaceMutableDoubleList
-
removeAtIndex
public double removeAtIndex(int index)
- Specified by:
removeAtIndex
in interfaceMutableDoubleList
-
set
public double set(int index, double element)
- Specified by:
set
in interfaceMutableDoubleList
-
with
public UnmodifiableDoubleList with(double element)
- Specified by:
with
in interfaceMutableDoubleCollection
- Specified by:
with
in interfaceMutableDoubleList
- Overrides:
with
in classAbstractUnmodifiableDoubleCollection
-
without
public UnmodifiableDoubleList without(double element)
- Specified by:
without
in interfaceMutableDoubleCollection
- Specified by:
without
in interfaceMutableDoubleList
- Overrides:
without
in classAbstractUnmodifiableDoubleCollection
-
withAll
public UnmodifiableDoubleList withAll(DoubleIterable elements)
- Specified by:
withAll
in interfaceMutableDoubleCollection
- Specified by:
withAll
in interfaceMutableDoubleList
- Overrides:
withAll
in classAbstractUnmodifiableDoubleCollection
-
withoutAll
public UnmodifiableDoubleList withoutAll(DoubleIterable elements)
- Specified by:
withoutAll
in interfaceMutableDoubleCollection
- Specified by:
withoutAll
in interfaceMutableDoubleList
- Overrides:
withoutAll
in classAbstractUnmodifiableDoubleCollection
-
select
public MutableDoubleList select(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.- Specified by:
select
in interfaceDoubleIterable
- Specified by:
select
in interfaceDoubleList
- Specified by:
select
in interfaceMutableDoubleCollection
- Specified by:
select
in interfaceMutableDoubleList
- Specified by:
select
in interfaceOrderedDoubleIterable
- Specified by:
select
in interfaceReversibleDoubleIterable
- Overrides:
select
in classAbstractUnmodifiableDoubleCollection
-
reject
public MutableDoubleList reject(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.- Specified by:
reject
in interfaceDoubleIterable
- Specified by:
reject
in interfaceDoubleList
- Specified by:
reject
in interfaceMutableDoubleCollection
- Specified by:
reject
in interfaceMutableDoubleList
- Specified by:
reject
in interfaceOrderedDoubleIterable
- Specified by:
reject
in interfaceReversibleDoubleIterable
- Overrides:
reject
in classAbstractUnmodifiableDoubleCollection
-
collect
public <V> MutableList<V> collect(DoubleToObjectFunction<? extends V> function)
Description copied from interface:DoubleIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceDoubleIterable
- Specified by:
collect
in interfaceDoubleList
- Specified by:
collect
in interfaceMutableDoubleCollection
- Specified by:
collect
in interfaceMutableDoubleList
- Specified by:
collect
in interfaceOrderedDoubleIterable
- Specified by:
collect
in interfaceReversibleDoubleIterable
- Overrides:
collect
in classAbstractUnmodifiableDoubleCollection
-
sortThis
public MutableDoubleList sortThis()
Description copied from interface:MutableDoubleList
Sorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThis
in interfaceMutableDoubleList
-
shuffleThis
public MutableDoubleList shuffleThis()
Description copied from interface:MutableDoubleList
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness.- Specified by:
shuffleThis
in interfaceMutableDoubleList
-
binarySearch
public int binarySearch(double value)
- Specified by:
binarySearch
in interfaceDoubleList
-
dotProduct
public double dotProduct(DoubleList list)
- Specified by:
dotProduct
in interfaceDoubleList
-
equals
public boolean equals(java.lang.Object otherList)
Description copied from interface:DoubleList
Follows the same general contract asList.equals(Object)
.- Specified by:
equals
in interfaceDoubleList
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Description copied from interface:DoubleList
Follows the same general contract asList.hashCode()
.- Specified by:
hashCode
in interfaceDoubleList
- Overrides:
hashCode
in classjava.lang.Object
-
asUnmodifiable
public MutableDoubleList asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableDoubleCollection
- Specified by:
asUnmodifiable
in interfaceMutableDoubleList
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableDoubleCollection
-
asSynchronized
public MutableDoubleList asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableDoubleCollection
- Specified by:
asSynchronized
in interfaceMutableDoubleList
- Overrides:
asSynchronized
in classAbstractUnmodifiableDoubleCollection
-
toImmutable
public ImmutableDoubleList toImmutable()
Description copied from interface:MutableDoubleList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceDoubleList
- Specified by:
toImmutable
in interfaceMutableDoubleCollection
- Specified by:
toImmutable
in interfaceMutableDoubleList
- Overrides:
toImmutable
in classAbstractUnmodifiableDoubleCollection
-
newEmpty
public MutableDoubleList newEmpty()
Description copied from interface:MutableDoubleList
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableDoubleCollection
- Specified by:
newEmpty
in interfaceMutableDoubleList
- Since:
- 9.2.
-
reverseThis
public MutableDoubleList reverseThis()
- Specified by:
reverseThis
in interfaceMutableDoubleList
-
toReversed
public MutableDoubleList toReversed()
- Specified by:
toReversed
in interfaceDoubleList
- Specified by:
toReversed
in interfaceMutableDoubleList
- Specified by:
toReversed
in interfaceReversibleDoubleIterable
-
forEachWithIndex
public void forEachWithIndex(DoubleIntProcedure procedure)
- Specified by:
forEachWithIndex
in interfaceOrderedDoubleIterable
-
asReversed
public LazyDoubleIterable asReversed()
- Specified by:
asReversed
in interfaceReversibleDoubleIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectIntoWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleDoubleIterable
-
distinct
public MutableDoubleList distinct()
- Specified by:
distinct
in interfaceDoubleList
- Specified by:
distinct
in interfaceMutableDoubleList
- Specified by:
distinct
in interfaceReversibleDoubleIterable
- Since:
- 6.0.
-
subList
public MutableDoubleList subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfaceDoubleList
- Specified by:
subList
in interfaceMutableDoubleList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipDouble
public MutableList<DoubleDoublePair> zipDouble(DoubleIterable iterable)
Description copied from interface:MutableDoubleList
Returns aMutableList
formed from thisMutableDoubleList
and anotherDoubleList
by combining corresponding elements in pairs. If one of the twoDoubleList
s is longer than the other, its remaining elements are ignored.- Specified by:
zipDouble
in interfaceDoubleList
- Specified by:
zipDouble
in interfaceMutableDoubleList
- Since:
- 9.1.
-
zip
public <T> MutableList<DoubleObjectPair<T>> zip(java.lang.Iterable<T> iterable)
Description copied from interface:MutableDoubleList
Returns aMutableList
formed from thisMutableDoubleList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zip
in interfaceDoubleList
- Specified by:
zip
in interfaceMutableDoubleList
- Since:
- 9.1.
-
selectWithIndex
public MutableDoubleList selectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceDoubleList
- Specified by:
selectWithIndex
in interfaceMutableDoubleList
- Specified by:
selectWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
selectWithIndex
in interfaceReversibleDoubleIterable
- Since:
- 11.1.
-
selectWithIndex
public <R extends MutableDoubleCollection> R selectWithIndex(DoubleIntPredicate predicate, R target)
Returns a new MutableDoubleCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceOrderedDoubleIterable
- Since:
- 11.1.
-
rejectWithIndex
public MutableDoubleList rejectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceDoubleList
- Specified by:
rejectWithIndex
in interfaceMutableDoubleList
- Specified by:
rejectWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
rejectWithIndex
in interfaceReversibleDoubleIterable
- Since:
- 11.1.
-
rejectWithIndex
public <R extends MutableDoubleCollection> R rejectWithIndex(DoubleIntPredicate predicate, R target)
Returns a new MutableDoubleCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceOrderedDoubleIterable
- Since:
- 11.1.
-
collectWithIndex
public <V> MutableList<V> collectWithIndex(DoubleIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceDoubleList
- Specified by:
collectWithIndex
in interfaceMutableDoubleList
- Specified by:
collectWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
collectWithIndex
in interfaceReversibleDoubleIterable
- Since:
- 9.1.
-
collectWithIndex
public <V,R extends java.util.Collection<V>> R collectWithIndex(DoubleIntToObjectFunction<? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedDoubleIterable
- Since:
- 9.1.
-
spliterator
public java.util.Spliterator.OfDouble spliterator()
- Specified by:
spliterator
in interfaceDoubleList
-
-