@Generated(date="2017-07-11T19:16:23+0200",
value="KTypeIndexedContainer.java")
public interface IntIndexedContainer
extends IntCollection, java.util.RandomAccess
index. Indexes are zero-based.| Modifier and Type | Method and Description |
|---|---|
void |
add(int e1)
Adds an element to the end of this container (the last index is incremented by one).
|
<T extends IntPredicate> |
forEach(T predicate,
int fromIndex,
int toIndex)
Applies
predicate to a slice of the container,
fromIndex, inclusive, to toIndex,
exclusive, or until predicate returns false. |
<T extends IntProcedure> |
forEach(T procedure,
int fromIndex,
int toIndex)
Applies
procedure to a slice of the container,
fromIndex, inclusive, to toIndex, exclusive. |
int |
get(int index) |
int |
indexOf(int e1)
Returns the index of the first occurrence of the specified element in this list,
or -1 if this list does not contain the element.
|
void |
insert(int index,
int e1)
Inserts the specified element at the specified position in this list.
|
int |
lastIndexOf(int e1)
Returns the index of the last occurrence of the specified element in this list,
or -1 if this list does not contain the element.
|
int |
remove(int index)
Removes the element at the specified position in this list and returns it.
|
int |
removeFirst(int e1)
Removes the first element that equals
e1, returning its
deleted position or -1 if the element was not found. |
int |
removeLast(int e1)
Removes the last element that equals
e1, returning its
deleted position or -1 if the element was not found. |
void |
removeRange(int fromIndex,
int toIndex)
Removes from this list all of the elements whose index is between
fromIndex, inclusive, and toIndex, exclusive. |
int |
set(int index,
int e1)
Replaces the element at the specified position in this list
with the specified element.
|
clear, removeAll, removeAll, removeAll, retainAll, retainAllint removeFirst(int e1)
e1, returning its
deleted position or -1 if the element was not found.int removeLast(int e1)
e1, returning its
deleted position or -1 if the element was not found.int indexOf(int e1)
int lastIndexOf(int e1)
void add(int e1)
void insert(int index,
int e1)
index - The index at which the element should be inserted, shifting
any existing and subsequent elements to the right.
Precondition : index must be valid !int set(int index,
int e1)
int get(int index)
index from the list.
Precondition : index must be valid !int remove(int index)
Careful. Do not confuse this method with the overridden signature in
Java Collections (List.remove(Object)). Use: IntCollection.removeAll(int),
removeFirst(int) or removeLast(int) depending
on the actual need.
void removeRange(int fromIndex,
int toIndex)
fromIndex, inclusive, and toIndex, exclusive.<T extends IntProcedure> T forEach(T procedure, int fromIndex, int toIndex)
procedure to a slice of the container,
fromIndex, inclusive, to toIndex, exclusive.<T extends IntPredicate> T forEach(T predicate, int fromIndex, int toIndex)
predicate to a slice of the container,
fromIndex, inclusive, to toIndex,
exclusive, or until predicate returns false.Copyright © 2017. All rights reserved.