E
- - Instance element typepublic abstract class InstanceBuffer<E> extends AbstractList<E>
createElement()
method needs to be implemented to use this
buffer.modCount
Constructor and Description |
---|
InstanceBuffer() |
Modifier and Type | Method and Description |
---|---|
E |
add()
Gets the next element and increases size by one.
|
void |
add(int index,
E element) |
List<E> |
addAll(int amount)
Gets the given amount of next elements and increases the size by the
amount
|
void |
clear() |
void |
clear(boolean clearBuffer)
Sets the element count back to 0, optionally clearing the backing buffer
|
abstract E |
createElement()
Creates a new Element to use in the buffer
|
E |
get(int index) |
E |
remove(int index) |
E |
set(int index,
E element) |
int |
size() |
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public abstract E createElement()
public E add()
public List<E> addAll(int amount)
amount
- to add and getpublic E remove(int index)
public E get(int index)
public void add(int index, E element)
public int size()
size
in interface Collection<E>
size
in interface List<E>
size
in class AbstractCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in interface List<E>
clear
in class AbstractList<E>
public void clear(boolean clearBuffer)
clearBuffer
- option: True to clear the backing buffer instancesCopyright © 2019. All rights reserved.