Interface LongList
- All Superinterfaces:
LongIterable
,OrderedLongIterable
,PrimitiveIterable
,ReversibleLongIterable
- All Known Subinterfaces:
ImmutableLongList
,MutableLongList
- All Known Implementing Classes:
LongArrayList
,LongInterval
,SynchronizedLongList
,UnmodifiableLongList
public interface LongList extends ReversibleLongIterable
This file was automatically generated from template file primitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and Type Method Description int
binarySearch(long value)
<V> ListIterable<V>
collect(LongToObjectFunction<? 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(LongIntToObjectFunction<? extends V> function)
Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.LongList
distinct()
long
dotProduct(LongList list)
boolean
equals(Object o)
Follows the same general contract asList.equals(Object)
.long
get(int index)
int
hashCode()
Follows the same general contract asList.hashCode()
.int
lastIndexOf(long value)
default LongStream
primitiveParallelStream()
default LongStream
primitiveStream()
LongList
reject(LongPredicate predicate)
Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.LongList
select(LongPredicate predicate)
Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.Spliterator.OfLong
spliterator()
LongList
subList(int fromIndex, int toIndex)
default LongList
tap(LongProcedure procedure)
ImmutableLongList
toImmutable()
Returns an immutable copy of this list.LongList
toReversed()
default <T> ListIterable<LongObjectPair<T>>
zip(Iterable<T> iterable)
Returns aListIterable
formed from thisLongList
and aListIterable
by combining corresponding elements in pairs.default ListIterable<LongLongPair>
zipLong(LongIterable iterable)
Returns aListIterable
formed from thisLongList
and anotherLongList
by combining corresponding elements in pairs.Methods inherited from interface org.eclipse.collections.api.LongIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, longIterator, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedLongIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf
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.ReversibleLongIterable
asReversed, getLast, injectIntoWithIndex
-
Method Details
-
get
long get(int index) -
dotProduct
-
binarySearch
int binarySearch(long value) -
lastIndexOf
int lastIndexOf(long value) -
select
Description copied from interface:LongIterable
Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.- Specified by:
select
in interfaceLongIterable
- Specified by:
select
in interfaceOrderedLongIterable
- Specified by:
select
in interfaceReversibleLongIterable
-
reject
Description copied from interface:LongIterable
Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.- Specified by:
reject
in interfaceLongIterable
- Specified by:
reject
in interfaceOrderedLongIterable
- Specified by:
reject
in interfaceReversibleLongIterable
-
tap
- Specified by:
tap
in interfaceLongIterable
- Since:
- 9.0.
-
collect
Description copied from interface:LongIterable
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 interfaceLongIterable
- Specified by:
collect
in interfaceOrderedLongIterable
- Specified by:
collect
in interfaceReversibleLongIterable
-
collectWithIndex
Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedLongIterable
- Specified by:
collectWithIndex
in interfaceReversibleLongIterable
- Since:
- 9.1.
-
equals
Follows the same general contract asList.equals(Object)
. -
hashCode
int hashCode()Follows the same general contract asList.hashCode()
. -
toImmutable
ImmutableLongList toImmutable()Returns an immutable copy of this list. If the list is immutable, it returns itself. -
distinct
LongList distinct()- Specified by:
distinct
in interfaceReversibleLongIterable
- Since:
- 6.0.
-
toReversed
LongList toReversed()- Specified by:
toReversed
in interfaceReversibleLongIterable
- Since:
- 5.0.
-
subList
- Since:
- 5.0.
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipLong
Returns aListIterable
formed from thisLongList
and anotherLongList
by combining corresponding elements in pairs. If one of the twoLongList
s is longer than the other, its remaining elements are ignored.- Since:
- 9.1.
-
zip
Returns aListIterable
formed from thisLongList
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
Spliterator.OfLong spliterator()- Since:
- 10.0
-
primitiveStream
- Since:
- 10.0
-
primitiveParallelStream
- Since:
- 10.0
-