| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private class | |
| private abstract static class |
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(E
element to be appended to this list e)Overrides java. Implements java. |
| public void | add(int
index at which the specified element is to be inserted index, E element to be inserted e)Overrides java. Implements java. |
| public void | clear()
Overrides java. Implements java. |
| public E | get(int
index of the element to return index)Implements abstract java. Implements java. |
| public int | |
| public @NotNull Iterator | iterator()
Overrides java. Implements java. |
| public E | remove(int
the index of the element to be removed index)Overrides java. Implements java. |
| public E | set(int
index of the element to replace index, E element to be stored at the specified position element)Overrides java. Implements java. |
| public int | size()
Implements abstract java. Implements java. |
| public void | sort(Comparator<? super E>
the comparator)Comparator used to compare list elements.
A null value indicates that the elements'
natural ordering should be usedOverrides default java. Comparator.
|
| public <T> T[] | toArray(T[]
the array into which the elements of this list are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose. a)Overrides java. Implements java. |
| public void |
| SmartList | back to summary |
|---|---|
| public SmartList() | |
| SmartList | back to summary |
|---|---|
| public SmartList(E element) | |
| SmartList | back to summary |
|---|---|
| public SmartList(@NotNull Collection<? extends E> elements) | |
| SmartList | back to summary |
|---|---|
| public SmartList(E... elements) | |
| add | back to summary |
|---|---|
| public boolean add(E e) Overrides java. Implements java. Doc from java. Appends the specified element to the end of this list (optional operation). Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.
| |
| add | back to summary |
|---|---|
| public void add(int index, E e) Overrides java. Implements java. Doc from java. Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Doc from java. Removes all of the elements from this list (optional operation). The list will be empty after this call returns.
| |
| get | back to summary |
|---|---|
| public E get(int index) Implements abstract java. Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| getModificationCount | back to summary |
|---|---|
| public int getModificationCount() | |
| iterator | back to summary |
|---|---|
| public @NotNull Iterator Overrides java. Implements java. Doc from java. Returns an iterator over the elements in this list in proper sequence. | |
| remove | back to summary |
|---|---|
| public E remove(int index) Overrides java. Implements java. Doc from java. Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
| |
| set | back to summary |
|---|---|
| public E set(int index, E element) Overrides java. Implements java. Doc from java. Replaces the element at the specified position in this list with the specified element (optional operation).
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| sort | back to summary |
|---|---|
| public void sort(Comparator<? super E> comparator) Overrides default java. Doc from java. Sorts this list according to the order induced by the specified
All elements in this list must be mutually comparable using the
specified comparator (that is, If the specified comparator is This list must be modifiable, but need not be resizable.
| |
| toArray | back to summary |
|---|---|
| public <T> T[] toArray(T[] a) Overrides java. Implements java. Doc from java. Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list. If the list fits in the specified array with room to spare (i.e.,
the array has more elements than the list), the element in the array
immediately following the end of the list is set to Like the Suppose
Note that toArray(new Object[0]) is identical in function to
toArray().
| |
| trimToSize | back to summary |
|---|---|
| public void trimToSize() Trims the capacity of this list to be the list's current size. An application can use this operation to minimize the storage of a list instance. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final SmartList. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> SmartList. | |
| public boolean | |
| public T | |
| public void | remove()
Overrides default java. |
| INSTANCE | back to summary |
|---|---|
| private static final SmartList. | |
| EmptyIterator | back to summary |
|---|---|
| private EmptyIterator() | |
| getInstance | back to summary |
|---|---|
| public static <T> SmartList. | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public T next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected E | getElement()
Implements abstract kotlin. |
| public void | remove()
Overrides default java. |
| myInitialModCount | back to summary |
|---|---|
| private final int myInitialModCount | |
| SingletonIterator | back to summary |
|---|---|
| public SingletonIterator() | |
| checkCoModification | back to summary |
|---|---|
| protected void checkCoModification() Implements abstract kotlin.
| |
| getElement | back to summary |
|---|---|
| protected E getElement() Implements abstract kotlin.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| protected abstract T | |
| public final boolean | |
| public final T |
| myVisited | back to summary |
|---|---|
| private boolean myVisited | |
| SingletonIteratorBase | back to summary |
|---|---|
| private SingletonIteratorBase() | |
| checkCoModification | back to summary |
|---|---|
| protected abstract void checkCoModification() | |
| getElement | back to summary |
|---|---|
| protected abstract T getElement() | |
| hasNext | back to summary |
|---|---|
| public final boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public final T next() Implements java. Doc from java. Returns the next element in the iteration.
| |