T - Type of the Array Listpublic class SmartArrayList<T>
extends java.util.ArrayList<T>
| コンストラクタと説明 |
|---|
SmartArrayList() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
T |
first()
Return the first element
|
T |
last()
Return the last element
|
int |
lastIndex()
Return the value of the last index, or -1 if array is empty
|
T |
next(int i)
Return the next element if exits otherwise null
|
T |
previous(int i)
Return the previous element, or null if index is 0
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic T first() throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException - If array is emptypublic T last() throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException - If array is emptypublic T previous(int i) throws java.lang.IndexOutOfBoundsException
i - Indexjava.lang.IndexOutOfBoundsException - If index is greater than array sizepublic T next(int i)
i - Indexpublic int lastIndex()