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 TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends T> c) boolean
addAll
(Collection<? extends T> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) get
(int index) boolean
hasNext()
int
boolean
isEmpty()
iterator()
int
listIterator
(int index) next()
void
remove()
remove
(int index) boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Iterator
forEachRemaining
Methods 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:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
-
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
subList
-