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

public Interface ShortList

extends ReversibleShortIterable
Known Direct Subinterfaces
org.eclipse.collections.api.list.primitive.ImmutableShortList, org.eclipse.collections.api.list.primitive.MutableShortList
Imports
org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.block.function.primitive.ShortIntToObjectFunction, .ShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.ShortIntPredicate, .ShortPredicate, org.eclipse.collections.api.block.procedure.primitive.ShortShortProcedure, .ShortProcedure, org.eclipse.collections.api.list.ListIterable, org.eclipse.collections.api.ordered.primitive.ReversibleShortIterable, org.eclipse.collections.api.tuple.primitive.ShortShortPair, .ShortObjectPair, java.util.Objects

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

Method Summary

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

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

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

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

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

public ShortList
public long
public boolean
equals(Object o)

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

public default void
forEachInBoth(ShortList other, ShortShortProcedure procedure)

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

public short
get(int index)

public int
hashCode()

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

public int
lastIndexOf(short value)

public ShortList
reject(ShortPredicate predicate)

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

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

public default ShortList
rejectWithIndex(ShortIntPredicate predicate)

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

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

public ShortList
select(ShortPredicate predicate)

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

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

public default ShortList
selectWithIndex(ShortIntPredicate predicate)

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

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

public ShortList
subList(int fromIndex, int toIndex)

public default ShortList
public ImmutableShortList
toImmutable()

Returns an immutable copy of this list.

public ShortList
public default <T> ListIterable<ShortObjectPair<T>>
zip(Iterable<T> iterable)

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

public default ListIterable<ShortShortPair>
zipShort(ShortIterable iterable)

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

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

Method Detail

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

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

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

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

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

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

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

Since
11.1
getback to summary
public short 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(short value)
rejectback to summary
public ShortList reject(ShortPredicate predicate)

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

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

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

Annotations
@Override
rejectWithIndexback to summary
public default ShortList rejectWithIndex(ShortIntPredicate predicate)

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

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

Annotations
@Override
Since
11.1.
selectback to summary
public ShortList select(ShortPredicate predicate)

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

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

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

Annotations
@Override
selectWithIndexback to summary
public default ShortList selectWithIndex(ShortIntPredicate predicate)

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

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

Annotations
@Override
Since
11.1.
subListback to summary
public ShortList subList(int fromIndex, int toIndex)
Since
5.0.
See Also
java.util.List#subList(int fromIndex, int toIndex)
tapback to summary
public default ShortList tap(ShortProcedure procedure)

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

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

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

toReversedback to summary
public ShortList toReversed()

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

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

Returns a ListIterable formed from this ShortList 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.
zipShortback to summary
public default ListIterable<ShortShortPair> zipShort(ShortIterable iterable)

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

Since
9.1.