public class DynamicList
extends java.lang.Object
implements java.util.List<java.lang.Integer>, java.util.RandomAccess
get(int)
is used.
UnsupportedOperationException
. The only methods supported by this class include:
Constructor and Description |
---|
DynamicList(int start,
int size,
int increment)
Create a new DynamicList.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Integer e) |
void |
add(int index,
java.lang.Integer element) |
boolean |
addAll(java.util.Collection<? extends java.lang.Integer> c) |
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Integer> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
void |
forEach(java.util.function.Consumer<? super java.lang.Integer> action) |
java.lang.Integer |
get(int index) |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<java.lang.Integer> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<java.lang.Integer> |
listIterator() |
java.util.ListIterator<java.lang.Integer> |
listIterator(int index) |
java.util.stream.Stream<java.lang.Integer> |
parallelStream() |
java.lang.Integer |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Integer> filter) |
void |
replaceAll(java.util.function.UnaryOperator<java.lang.Integer> operator) |
boolean |
retainAll(java.util.Collection<?> c) |
java.lang.Integer |
set(int index,
java.lang.Integer element) |
int |
size() |
void |
sort(java.util.Comparator<? super java.lang.Integer> c) |
java.util.Spliterator<java.lang.Integer> |
spliterator() |
java.util.stream.Stream<java.lang.Integer> |
stream() |
java.util.List<java.lang.Integer> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public DynamicList(int start, int size, int increment)
start
- The first element value.size
- The number of the elements to create.increment
- The increment amount between neighbouring elements.public boolean add(java.lang.Integer e)
add
in interface java.util.Collection<java.lang.Integer>
add
in interface java.util.List<java.lang.Integer>
public void add(int index, java.lang.Integer element)
add
in interface java.util.List<java.lang.Integer>
public boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
addAll
in interface java.util.Collection<java.lang.Integer>
addAll
in interface java.util.List<java.lang.Integer>
public boolean addAll(int index, java.util.Collection<? extends java.lang.Integer> c)
addAll
in interface java.util.List<java.lang.Integer>
public void clear()
clear
in interface java.util.Collection<java.lang.Integer>
clear
in interface java.util.List<java.lang.Integer>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<java.lang.Integer>
contains
in interface java.util.List<java.lang.Integer>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<java.lang.Integer>
containsAll
in interface java.util.List<java.lang.Integer>
public java.lang.Integer get(int index)
get
in interface java.util.List<java.lang.Integer>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<java.lang.Integer>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<java.lang.Integer>
isEmpty
in interface java.util.List<java.lang.Integer>
public java.util.Iterator<java.lang.Integer> iterator()
iterator
in interface java.lang.Iterable<java.lang.Integer>
iterator
in interface java.util.Collection<java.lang.Integer>
iterator
in interface java.util.List<java.lang.Integer>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<java.lang.Integer>
public java.util.ListIterator<java.lang.Integer> listIterator()
listIterator
in interface java.util.List<java.lang.Integer>
public java.util.ListIterator<java.lang.Integer> listIterator(int index)
listIterator
in interface java.util.List<java.lang.Integer>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<java.lang.Integer>
remove
in interface java.util.List<java.lang.Integer>
public java.lang.Integer remove(int index)
remove
in interface java.util.List<java.lang.Integer>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<java.lang.Integer>
removeAll
in interface java.util.List<java.lang.Integer>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<java.lang.Integer>
retainAll
in interface java.util.List<java.lang.Integer>
public java.lang.Integer set(int index, java.lang.Integer element)
set
in interface java.util.List<java.lang.Integer>
public int size()
size
in interface java.util.Collection<java.lang.Integer>
size
in interface java.util.List<java.lang.Integer>
public java.util.List<java.lang.Integer> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<java.lang.Integer>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.lang.Integer>
toArray
in interface java.util.List<java.lang.Integer>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<java.lang.Integer>
toArray
in interface java.util.List<java.lang.Integer>
public boolean removeIf(java.util.function.Predicate<? super java.lang.Integer> filter)
removeIf
in interface java.util.Collection<java.lang.Integer>
public java.util.stream.Stream<java.lang.Integer> stream()
stream
in interface java.util.Collection<java.lang.Integer>
public java.util.stream.Stream<java.lang.Integer> parallelStream()
parallelStream
in interface java.util.Collection<java.lang.Integer>
public void forEach(java.util.function.Consumer<? super java.lang.Integer> action)
forEach
in interface java.lang.Iterable<java.lang.Integer>
public void replaceAll(java.util.function.UnaryOperator<java.lang.Integer> operator)
replaceAll
in interface java.util.List<java.lang.Integer>
public void sort(java.util.Comparator<? super java.lang.Integer> c)
sort
in interface java.util.List<java.lang.Integer>
public java.util.Spliterator<java.lang.Integer> spliterator()
spliterator
in interface java.lang.Iterable<java.lang.Integer>
spliterator
in interface java.util.Collection<java.lang.Integer>
spliterator
in interface java.util.List<java.lang.Integer>