Top Description Methods
org.eclipse.collections.api.list.primitive

public Interface LongList

extends ReversibleLongIterable
Known Direct Subinterfaces
org.eclipse.collections.api.list.primitive.MutableLongList, org.eclipse.collections.api.list.primitive.ImmutableLongList
Imports
org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.block.function.primitive.LongIntToObjectFunction, .LongToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.LongIntPredicate, .LongPredicate, org.eclipse.collections.api.block.procedure.primitive.LongLongProcedure, .LongProcedure, org.eclipse.collections.api.list.ListIterable, org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable, org.eclipse.collections.api.tuple.primitive.LongLongPair, .LongObjectPair, java.util.Spliterator, .Objects, java.util.stream.StreamSupport, .LongStream

This file was automatically generated from template file primitiveList.stg.
Since
3.0.

Method Summary

Modifier and TypeMethod and Description
public int
binarySearch(long value)

public <V> ListIterable<V>
collect(LongToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public default <V> ListIterable<V>
collectWithIndex(LongIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.collectWithIndex.

Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.

public LongList
public long
public boolean
equals(Object o)

Follows the same general contract as java.util.List#equals(Object).

public default void
forEachInBoth(LongList other, LongLongProcedure procedure)

This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.

public long
get(int index)

public int
hashCode()

Follows the same general contract as java.util.List#hashCode().

public int
lastIndexOf(long value)

public default LongStream
public default LongStream
public LongList
reject(LongPredicate predicate)

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.reject.

Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.

public default LongList
rejectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.rejectWithIndex.

Returns a new LongList excluding all elements with corresponding indexes matching the specified predicate.

public LongList
select(LongPredicate predicate)

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.select.

Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.

public default LongList
selectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.selectWithIndex.

Returns a new LongList including all elements with corresponding indexes matching the specified predicate.

public Spliterator.OfLong
public LongList
subList(int fromIndex, int toIndex)

public default LongList
public ImmutableLongList
toImmutable()

Returns an immutable copy of this list.

public LongList
public default <T> ListIterable<LongObjectPair<T>>
zip(Iterable<T> iterable)

Returns a ListIterable formed from this LongList and a ListIterable by combining corresponding elements in pairs.

public default ListIterable<LongLongPair>
zipLong(LongIterable iterable)

Returns a ListIterable formed from this LongList and another LongList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable:
asReversedgetLastinjectIntoWithIndex

Method Detail

binarySearchback to summary
public int binarySearch(long value)
collectback to summary
public <V> ListIterable<V> collect(LongToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.collect.

Doc from org.eclipse.collections.api.LongIterable.collect.

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.

Annotations
@Override
collectWithIndexback to summary
public default <V> ListIterable<V> collectWithIndex(LongIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.collectWithIndex.

Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.

Annotations
@Override
Since
9.1.
distinctback to summary
public LongList distinct()

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.distinct.

Annotations
@Override
Since
6.0.
dotProductback to summary
public long dotProduct(LongList list)
equalsback to summary
public boolean equals(Object o)

Follows the same general contract as java.util.List#equals(Object).

Annotations
@Override
forEachInBothback to summary
public 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
getback to summary
public long get(int index)
hashCodeback to summary
public int hashCode()

Follows the same general contract as java.util.List#hashCode().

Annotations
@Override
lastIndexOfback to summary
public int lastIndexOf(long value)
primitiveParallelStreamback to summary
public default LongStream primitiveParallelStream()
Since
10.0
primitiveStreamback to summary
public default LongStream primitiveStream()
Since
10.0
rejectback to summary
public LongList reject(LongPredicate predicate)

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.reject.

Doc from org.eclipse.collections.api.LongIterable.reject.

Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.

Annotations
@Override
rejectWithIndexback to summary
public default LongList rejectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.rejectWithIndex.

Returns a new LongList excluding all elements with corresponding indexes matching the specified predicate.

Annotations
@Override
Since
11.1.
selectback to summary
public LongList select(LongPredicate predicate)

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.select.

Doc from org.eclipse.collections.api.LongIterable.select.

Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.

Annotations
@Override
selectWithIndexback to summary
public default LongList selectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.selectWithIndex.

Returns a new LongList including all elements with corresponding indexes matching the specified predicate.

Annotations
@Override
Since
11.1.
spliteratorback to summary
public Spliterator.OfLong spliterator()
Since
10.0
subListback to summary
public LongList subList(int fromIndex, int toIndex)
Since
5.0.
See Also
java.util.List#subList(int fromIndex, int toIndex)
tapback to summary
public default LongList tap(LongProcedure procedure)

Overrides default org.eclipse.collections.api.LongIterable.tap.

Annotations
@Override
Since
9.0.
toImmutableback to summary
public ImmutableLongList toImmutable()

Returns an immutable copy of this list. If the list is immutable, it returns itself.

toReversedback to summary
public LongList toReversed()

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.toReversed.

Annotations
@Override
Since
5.0.
zipback to summary
public default <T> ListIterable<LongObjectPair<T>> zip(Iterable<T> iterable)

Returns a ListIterable formed from this LongList and a ListIterable 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.
zipLongback to summary
public default ListIterable<LongLongPair> zipLong(LongIterable iterable)

Returns a ListIterable formed from this LongList and another LongList by combining corresponding elements in pairs. If one of the two LongLists is longer than the other, its remaining elements are ignored.

Since
9.1.