Class PriorityCollection<E extends PriorityAware>

  • Type Parameters:
    E - The type this class may hold, this is generic as can be anything that extends PriorityAware.
    All Implemented Interfaces:
    Iterable<E>, Collection<E>

    public class PriorityCollection<E extends PriorityAware>
    extends AbstractCollection<E>
    This class's purpose is to hold the the different collections used for each priority level. A supplier is required to provide the underlying collection needed when a new priority level is seen, and the end behaviour is that of the underlying collection, e.g. if set add will follow set's add semantics, if list, then list semantics. Methods getArray, setArray MUST never be exposed, and all array modifications must go through these.