Class SizeLimitedVector<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<E>
org.frankframework.util.SizeLimitedVector<E>
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, SequencedCollection<E>
- Direct Known Subclasses:
MessageKeeper
Stores a maximum number of elements in a Vector. If, after the maximum has
exceeded, another element is put in the vector the oldest element is removed.
- Author:
- Johan Verrips
- See Also:
-
Field Summary
Fields inherited from class Vector
capacityIncrement, elementCount, elementDataFields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetMaxSize(int maxSize) sets the Maximum Size to maxSize.Methods inherited from class Vector
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizeMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
-
Constructor Details
-
SizeLimitedVector
public SizeLimitedVector()SizeLimitedVector constructor comment. -
SizeLimitedVector
public SizeLimitedVector(int maxSize)
-
-
Method Details
-
add
-
setMaxSize
public void setMaxSize(int maxSize) sets the Maximum Size to maxSize. If the current size is greater than the maximum size, the top elements are removed.
-