Package com.storedobject.common
Class Array<T>
java.lang.Object
com.storedobject.common.Array<T>
- Type Parameters:
T- Value type.
- All Implemented Interfaces:
Loop<T>,Iterable<T>,Collection<T>,Iterator<T>,List<T>,SequencedCollection<T>
An array implementation with variable size.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()booleanbooleancontainsAll(Collection<?> c) get(int index) booleanhasNext()intbooleanisEmpty()iterator()intlistIterator(int index) next()voidremove()remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<A> A[]toArray(A[] a) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Iterator
forEachRemainingMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
Array
-
Array
Constructor- Parameters:
array- Arraylower- Position of the first element in the array
-
Array
Constructor- Parameters:
array- Arraylower- Position of the first element in the arrayupper- Position of the last element in the array
-
-
Method Details
-
toString
-
toString
-
iterator
-
hasNext
-
next
-
remove
-
size
-
isEmpty
-
contains
-
toArray
-
toArray
-
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
-
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
subList
-