public interface CircularBuffer<E>
extends java.util.List<E>
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(java.util.Collection<? extends E> elements) |
int |
capacity() |
int |
end() |
E |
get(int i) |
java.util.Iterator<E> |
iterator() |
java.util.ListIterator<E> |
listIterator()
Not supported
|
java.util.ListIterator<E> |
listIterator(int i)
Not supported
|
int |
offset() |
E |
remove(int i)
Remove the element.
|
CircularBuffer<E> |
removeFirst(int n)
Remove the elements from the beginning.
|
CircularBuffer<E> |
removeLast(int n)
Remove the last elements
|
E |
set(int i,
E e)
Replace the element value
|
java.util.List<E> |
subList(int fromIndex,
int toIndex)
Not supported
|
int capacity()
int offset()
int end()
boolean add(E e)
boolean addAll(java.util.Collection<? extends E> elements)
E get(int i) throws java.lang.IndexOutOfBoundsException
get in interface java.util.List<E>i - element indexjava.lang.IndexOutOfBoundsException - if the index is out of boundsE set(int i, E e) throws java.lang.IndexOutOfBoundsException
set in interface java.util.List<E>i - element indexe - new element valuejava.lang.IndexOutOfBoundsException - if the index is out of boundsE remove(int i) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
remove in interface java.util.List<E>i - element indexjava.lang.IndexOutOfBoundsException - if the index is out of boundsjava.lang.UnsupportedOperationException - if the index points to not 1st neither last elementCircularBuffer<E> removeFirst(int n) throws java.lang.IndexOutOfBoundsException
n - the count of elements to removejava.lang.IndexOutOfBoundsException - if the count of elements to remove is more than the current sizeCircularBuffer<E> removeLast(int n) throws java.lang.IndexOutOfBoundsException
n - the count of elements to removejava.lang.IndexOutOfBoundsException - if the count of elements to remove is more than the current sizejava.util.List<E> subList(int fromIndex, int toIndex) throws java.lang.UnsupportedOperationException
subList in interface java.util.List<E>java.lang.UnsupportedOperationException - alwaysjava.util.Iterator<E> iterator()
java.util.ListIterator<E> listIterator() throws java.lang.UnsupportedOperationException
listIterator in interface java.util.List<E>java.lang.UnsupportedOperationException - always