Interface DoubleList
-
- All Superinterfaces:
DoubleIterable
,OrderedDoubleIterable
,PrimitiveIterable
,ReversibleDoubleIterable
- All Known Subinterfaces:
ImmutableDoubleList
,MutableDoubleList
- All Known Implementing Classes:
DoubleArrayList
,ImmutableDoubleArrayList
,ImmutableDoubleEmptyList
,ImmutableDoubleSingletonList
,SynchronizedDoubleList
,UnmodifiableDoubleList
public interface DoubleList extends ReversibleDoubleIterable
This file was automatically generated from template file primitiveList.stg.- Since:
- 3.0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
binarySearch(double value)
<V> ListIterable<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.default <V> ListIterable<V>
collectWithIndex(DoubleIntToObjectFunction<? extends V> function)
Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.DoubleList
distinct()
double
dotProduct(DoubleList list)
boolean
equals(java.lang.Object o)
Follows the same general contract asList.equals(Object)
.default void
forEachInBoth(DoubleList other, DoubleDoubleProcedure procedure)
This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.double
get(int index)
int
hashCode()
Follows the same general contract asList.hashCode()
.int
lastIndexOf(double value)
default java.util.stream.DoubleStream
primitiveParallelStream()
default java.util.stream.DoubleStream
primitiveStream()
DoubleList
reject(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.default DoubleList
rejectWithIndex(DoubleIntPredicate predicate)
Returns a new DoubleList excluding all elements with corresponding indexes matching the specified predicate.DoubleList
select(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.default DoubleList
selectWithIndex(DoubleIntPredicate predicate)
Returns a new DoubleList including all elements with corresponding indexes matching the specified predicate.java.util.Spliterator.OfDouble
spliterator()
DoubleList
subList(int fromIndex, int toIndex)
default DoubleList
tap(DoubleProcedure procedure)
ImmutableDoubleList
toImmutable()
Returns an immutable copy of this list.DoubleList
toReversed()
default <T> ListIterable<DoubleObjectPair<T>>
zip(java.lang.Iterable<T> iterable)
Returns aListIterable
formed from thisDoubleList
and aListIterable
by combining corresponding elements in pairs.default ListIterable<DoubleDoublePair>
zipDouble(DoubleIterable iterable)
Returns aListIterable
formed from thisDoubleList
and anotherDoubleList
by combining corresponding elements in pairs.-
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, doubleIterator, 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.ordered.primitive.OrderedDoubleIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.ReversibleDoubleIterable
asReversed, getLast, injectIntoWithIndex
-
-
-
-
Method Detail
-
get
double get(int index)
-
dotProduct
double dotProduct(DoubleList list)
-
binarySearch
int binarySearch(double value)
-
lastIndexOf
int lastIndexOf(double value)
-
select
DoubleList 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 interfaceOrderedDoubleIterable
- Specified by:
select
in interfaceReversibleDoubleIterable
-
reject
DoubleList 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 interfaceOrderedDoubleIterable
- Specified by:
reject
in interfaceReversibleDoubleIterable
-
tap
default DoubleList tap(DoubleProcedure procedure)
- Specified by:
tap
in interfaceDoubleIterable
- Since:
- 9.0.
-
forEachInBoth
default void forEachInBoth(DoubleList other, DoubleDoubleProcedure procedure)
This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.- Since:
- 11.1
-
selectWithIndex
default DoubleList selectWithIndex(DoubleIntPredicate predicate)
Returns a new DoubleList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
selectWithIndex
in interfaceReversibleDoubleIterable
- Since:
- 11.1.
-
rejectWithIndex
default DoubleList rejectWithIndex(DoubleIntPredicate predicate)
Returns a new DoubleList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
rejectWithIndex
in interfaceReversibleDoubleIterable
- Since:
- 11.1.
-
collect
<V> ListIterable<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 interfaceOrderedDoubleIterable
- Specified by:
collect
in interfaceReversibleDoubleIterable
-
collectWithIndex
default <V> ListIterable<V> collectWithIndex(DoubleIntToObjectFunction<? extends V> function)
Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
collectWithIndex
in interfaceReversibleDoubleIterable
- Since:
- 9.1.
-
equals
boolean equals(java.lang.Object o)
Follows the same general contract asList.equals(Object)
.- Overrides:
equals
in classjava.lang.Object
-
hashCode
int hashCode()
Follows the same general contract asList.hashCode()
.- Overrides:
hashCode
in classjava.lang.Object
-
toImmutable
ImmutableDoubleList toImmutable()
Returns an immutable copy of this list. If the list is immutable, it returns itself.
-
distinct
DoubleList distinct()
- Specified by:
distinct
in interfaceReversibleDoubleIterable
- Since:
- 6.0.
-
toReversed
DoubleList toReversed()
- Specified by:
toReversed
in interfaceReversibleDoubleIterable
- Since:
- 5.0.
-
subList
DoubleList subList(int fromIndex, int toIndex)
- Since:
- 5.0.
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipDouble
default ListIterable<DoubleDoublePair> zipDouble(DoubleIterable iterable)
Returns aListIterable
formed from thisDoubleList
and anotherDoubleList
by combining corresponding elements in pairs. If one of the twoDoubleList
s is longer than the other, its remaining elements are ignored.- Since:
- 9.1.
-
zip
default <T> ListIterable<DoubleObjectPair<T>> zip(java.lang.Iterable<T> iterable)
Returns aListIterable
formed from thisDoubleList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Since:
- 9.1.
-
spliterator
java.util.Spliterator.OfDouble spliterator()
- Since:
- 10.0
-
primitiveStream
default java.util.stream.DoubleStream primitiveStream()
- Since:
- 10.0
-
primitiveParallelStream
default java.util.stream.DoubleStream primitiveParallelStream()
- Since:
- 10.0
-
-