Interface LongList
-
- All Superinterfaces:
LongIterable,OrderedLongIterable,PrimitiveIterable,ReversibleLongIterable
- All Known Subinterfaces:
ImmutableLongList,MutableLongList
public interface LongList extends ReversibleLongIterable
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 intbinarySearch(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.LongListdistinct()longdotProduct(LongList list)booleanequals(Object o)Follows the same general contract asList.equals(Object).default voidforEachInBoth(LongList other, LongLongProcedure procedure)This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.longget(int index)inthashCode()Follows the same general contract asList.hashCode().intlastIndexOf(long value)default LongStreamprimitiveParallelStream()default LongStreamprimitiveStream()LongListreject(LongPredicate predicate)Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.default LongListrejectWithIndex(LongIntPredicate predicate)Returns a new LongList excluding all elements with corresponding indexes matching the specified predicate.LongListselect(LongPredicate predicate)Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.default LongListselectWithIndex(LongIntPredicate predicate)Returns a new LongList including all elements with corresponding indexes matching the specified predicate.Spliterator.OfLongspliterator()LongListsubList(int fromIndex, int toIndex)default LongListtap(LongProcedure procedure)ImmutableLongListtoImmutable()Returns an immutable copy of this list.LongListtoReversed()default <T> ListIterable<LongObjectPair<T>>zip(Iterable<T> iterable)Returns aListIterableformed from thisLongListand aListIterableby combining corresponding elements in pairs.default ListIterable<LongLongPair>zipLong(LongIterable iterable)Returns aListIterableformed from thisLongListand anotherLongListby 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, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, longIterator, 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.OrderedLongIterable
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.ReversibleLongIterable
asReversed, getLast, injectIntoWithIndex
-
-
-
-
Method Detail
-
get
long get(int index)
-
dotProduct
long dotProduct(LongList list)
-
binarySearch
int binarySearch(long value)
-
lastIndexOf
int lastIndexOf(long value)
-
select
LongList select(LongPredicate predicate)
Description copied from interface:LongIterableReturns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceOrderedLongIterable- Specified by:
selectin interfaceReversibleLongIterable
-
reject
LongList reject(LongPredicate predicate)
Description copied from interface:LongIterableReturns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceOrderedLongIterable- Specified by:
rejectin interfaceReversibleLongIterable
-
tap
default LongList tap(LongProcedure procedure)
- Specified by:
tapin interfaceLongIterable- Since:
- 9.0.
-
forEachInBoth
default void forEachInBoth(LongList other, LongLongProcedure procedure)
This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.- Since:
- 11.1
-
selectWithIndex
default LongList selectWithIndex(LongIntPredicate predicate)
Returns a new LongList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedLongIterable- Specified by:
selectWithIndexin interfaceReversibleLongIterable- Since:
- 11.1.
-
rejectWithIndex
default LongList rejectWithIndex(LongIntPredicate predicate)
Returns a new LongList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedLongIterable- Specified by:
rejectWithIndexin interfaceReversibleLongIterable- Since:
- 11.1.
-
collect
<V> ListIterable<V> collect(LongToObjectFunction<? extends V> function)
Description copied from interface:LongIterableReturns 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:
collectin interfaceLongIterable- Specified by:
collectin interfaceOrderedLongIterable- Specified by:
collectin interfaceReversibleLongIterable
-
collectWithIndex
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.- Specified by:
collectWithIndexin interfaceOrderedLongIterable- Specified by:
collectWithIndexin interfaceReversibleLongIterable- Since:
- 9.1.
-
equals
boolean equals(Object o)
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:
distinctin interfaceReversibleLongIterable- Since:
- 6.0.
-
toReversed
LongList toReversed()
- Specified by:
toReversedin interfaceReversibleLongIterable- Since:
- 5.0.
-
subList
LongList subList(int fromIndex, int toIndex)
- Since:
- 5.0.
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipLong
default ListIterable<LongLongPair> zipLong(LongIterable iterable)
Returns aListIterableformed from thisLongListand anotherLongListby combining corresponding elements in pairs. If one of the twoLongLists is longer than the other, its remaining elements are ignored.- Since:
- 9.1.
-
zip
default <T> ListIterable<LongObjectPair<T>> zip(Iterable<T> iterable)
Returns aListIterableformed from thisLongListand aListIterableby 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
default LongStream primitiveStream()
- Since:
- 10.0
-
primitiveParallelStream
default LongStream primitiveParallelStream()
- Since:
- 10.0
-
-