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
Direct Known Subclasses:
MessageKeeper

public class SizeLimitedVector<E> extends Vector<E>
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:
  • Constructor Details

    • SizeLimitedVector

      public SizeLimitedVector()
      SizeLimitedVector constructor comment.
    • SizeLimitedVector

      public SizeLimitedVector(int maxSize)
  • Method Details

    • add

      public boolean add(E o)
      Specified by:
      add in interface Collection<E>
      Specified by:
      add in interface List<E>
      Overrides:
      add in class Vector<E>
    • 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.
    • getMaxSize

      public int getMaxSize()