| Modifier and Type | Field and Description |
|---|---|
| private int[] | |
| private static final int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(final int
the index where the new value is to be added index, final int the new value value)add the specified value at the specified index |
| public boolean | Returns: true (as per the general contract of the Collection.add method).element to be appended to this list. value)Appends the specified element to the end of this list |
| public boolean | |
| public boolean | Returns: true if this list changed as a result of the call.index at which to insert first element from the
specified collection. index, final IntList elements to be inserted into this list. c)Inserts all of the elements in the specified collection into this list at the specified position. |
| public void | |
| public boolean | Returns: true if this list contains the specified element.element whose presence in this list is to be tested. o)Returns true if this list contains the specified element. |
| public boolean | Returns: true if this list contains all of the elements of the specified collection.collection to be checked for containment in this list. c)Returns true if this list contains all of the elements of the specified collection. |
| public boolean | Returns: true if the specified object is equal to this list.the object to be compared for equality with this list. o)Overrides java. Compares the specified object with this list for equality. |
| public int | Returns: the element at the specified position in this list.index of element to return. index)Returns the element at the specified position in this list. |
| private void | |
| public int | Returns: the hash code value for this list.Overrides java. Returns the hash code value for this list. |
| public int | Returns: the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.element to search for. o)Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. |
| public boolean | Returns: true if this list contains no elements.Returns true if this list contains no elements. |
| public int | Returns: the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.element to search for. o)Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. |
| public int | Returns: the element previously at the specified position.the index of the element to removed. index)Removes the element at the specified position in this list. |
| public boolean | |
| public boolean | Returns: true if this list contained the specified element.element to be removed from this list, if present. o)Removes the first occurrence in this list of the specified element (optional operation). |
| public boolean | |
| public int | Returns: the element previously at the specified position.index of element to replace. index, final int element to be stored at the specified position. element)Replaces the element at the specified position in this list with the specified element |
| public int | |
| public int[] | Returns: an array containing all of the elements in this list in proper sequence.Returns an array containing all of the elements in this list in proper sequence. |
| public int[] | Returns: an array containing the elements of this list.the array into which the elements of this list are to
be stored, if it is big enough; otherwise, a new array
is allocated for this purpose. a)Returns an array containing all of the elements in this list in proper sequence. |
| _array | back to summary |
|---|---|
| private int[] _array | |
| _default_size | back to summary |
|---|---|
| private static final int _default_size | |
| _limit | back to summary |
|---|---|
| private int _limit | |
| IntList | back to summary |
|---|---|
| public IntList() create an IntList of default size | |
| IntList | back to summary |
|---|---|
| public IntList(final int initialCapacity) | |
| IntList | back to summary |
|---|---|
| public IntList(final IntList list) create a copy of an existing IntList
| |
| add | back to summary |
|---|---|
| public void add(final int index, final int value) add the specified value at the specified index
| |
| add | back to summary |
|---|---|
| public boolean add(final int value) Appends the specified element to the end of this list
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(final IntList c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(final int index, final IntList c) Inserts all of the elements in the specified collection into this list at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
| |
| clear | back to summary |
|---|---|
| public void clear() Removes all of the elements from this list. This list will be empty after this call returns (unless it throws an exception). | |
| contains | back to summary |
|---|---|
| public boolean contains(final int o) Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that o == e
| |
| containsAll | back to summary |
|---|---|
| public boolean containsAll(final IntList c) Returns true if this list contains all of the elements of the specified collection.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object o) Overrides java. Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if e1 == e2.) In other words, two lists are defined to be equal if they contain the same elements in the same order. This definition ensures that the equals method works properly across different implementations of the List interface.
| |
| get | back to summary |
|---|---|
| public int get(final int index) Returns the element at the specified position in this list.
| |
| growArray | back to summary |
|---|---|
| private void growArray(final int new_size) | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code value for this list. The hash code of a
list is defined to be the result of the following calculation:
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(final int o) Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the lowest index i such that (o == get(i)), or -1 if there is no such index.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if this list contains no elements.
| |
| lastIndexOf | back to summary |
|---|---|
| public int lastIndexOf(final int o) Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the highest index i such that (o == get(i)), or -1 if there is no such index.
| |
| remove | back to summary |
|---|---|
| public int remove(final int index) Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(final IntList c) Removes from this list all the elements that are contained in the specified collection
| |
| removeValue | back to summary |
|---|---|
| public boolean removeValue(final int o) Removes the first occurrence in this list of the specified element (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that (o.equals(get(i))) (if such an element exists).
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(final IntList c) Retains only the elements in this list that are contained in the specified collection. In other words, removes from this list all the elements that are not contained in the specified collection.
| |
| set | back to summary |
|---|---|
| public int set(final int index, final int element) Replaces the element at the specified position in this list with the specified element
| |
| size | back to summary |
|---|---|
| public int size() Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
| |
| toArray | back to summary |
|---|---|
| public int[] toArray() Returns an array containing all of the elements in this list in proper sequence. Obeys the general contract of the Collection.toArray method.
| |
| toArray | back to summary |
|---|---|
| public int[] toArray(final int[] a) Returns an array containing all of the elements in this list in proper sequence. Obeys the general contract of the Collection.toArray(Object[]) method.
| |