java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList<E>
org.sejda.commons.collection.CircularLinkedList<E>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<E>,Collection<E>,Deque<E>,List<E>,Queue<E>
A
LinkedList with size constraints. When at maxCapacity and an element is added, the eldest element is removed.- Author:
- Andrea Vacondio
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends E> c) booleanaddAll(Collection<? extends E> c) voidvoidintbooleanisFull()voidsetMaxCapacity(int maxCapacity) Methods inherited from class java.util.LinkedList
clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSequentialList
iteratorMethods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Constructor Details
-
CircularLinkedList
public CircularLinkedList(int maxCapacity)
-
-
Method Details
-
setMaxCapacity
public void setMaxCapacity(int maxCapacity) -
getMaxCapacity
public int getMaxCapacity() -
isFull
public boolean isFull() -
addFirst
-
addLast
-
add
-
addAll
-
addAll
-
add
-