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

public Interface IntList

extends ReversibleIntIterable
Known Direct Subinterfaces
org.eclipse.collections.api.list.primitive.MutableIntList, org.eclipse.collections.api.list.primitive.ImmutableIntList
Imports
org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.block.function.primitive.IntIntToObjectFunction, .IntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntIntPredicate, .IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntIntProcedure, .IntProcedure, org.eclipse.collections.api.list.ListIterable, org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable, org.eclipse.collections.api.tuple.primitive.IntIntPair, .IntObjectPair, java.util.Spliterator, .Objects, java.util.stream.StreamSupport, .IntStream

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

Method Summary

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

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

Redeclares org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable.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(IntIntToObjectFunction<? extends V> function)

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

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

public IntList
public long
public boolean
equals(Object o)

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

public default void
forEachInBoth(IntList other, IntIntProcedure procedure)

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

public int
get(int index)

public int
hashCode()

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

public int
lastIndexOf(int value)

public default IntStream
public default IntStream
public IntList
reject(IntPredicate predicate)

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

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

public default IntList
rejectWithIndex(IntIntPredicate predicate)

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

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

public IntList
select(IntPredicate predicate)

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

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

public default IntList
selectWithIndex(IntIntPredicate predicate)

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

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

public Spliterator.OfInt
public IntList
subList(int fromIndex, int toIndex)

public default IntList
public ImmutableIntList
toImmutable()

Returns an immutable copy of this list.

public IntList
public default <T> ListIterable<IntObjectPair<T>>
zip(Iterable<T> iterable)

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

public default ListIterable<IntIntPair>
zipInt(IntIterable iterable)

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

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

Method Detail

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

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

Doc from org.eclipse.collections.api.IntIterable.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(IntIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable.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 IntList distinct()

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

Annotations
@Override
Since
6.0.
dotProductback to summary
public long dotProduct(IntList 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(IntList other, IntIntProcedure procedure)

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

Since
11.1
getback to summary
public int 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(int value)
primitiveParallelStreamback to summary
public default IntStream primitiveParallelStream()
Since
10.0
primitiveStreamback to summary
public default IntStream primitiveStream()
Since
10.0
rejectback to summary
public IntList reject(IntPredicate predicate)

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

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

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

Annotations
@Override
rejectWithIndexback to summary
public default IntList rejectWithIndex(IntIntPredicate predicate)

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

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

Annotations
@Override
Since
11.1.
selectback to summary
public IntList select(IntPredicate predicate)

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

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

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

Annotations
@Override
selectWithIndexback to summary
public default IntList selectWithIndex(IntIntPredicate predicate)

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

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

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

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

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

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

toReversedback to summary
public IntList toReversed()

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

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

Returns a ListIterable formed from this IntList 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.
zipIntback to summary
public default ListIterable<IntIntPair> zipInt(IntIterable iterable)

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

Since
9.1.