LimitedList<E> extension

A list that can manage its own length.

on
  • DoubleLinkedQueue<E>

Methods

pushWithLimit(E element, int limit) → void
Adds element to this list and pops an element to keep the total length within limit.