Interface PriorityLinkedList<E>

All Known Implementing Classes:
PriorityLinkedListImpl

public interface PriorityLinkedList<E>
A type of linked list which maintains items according to a priority and allows adding and removing of elements at both ends, and peeking.

Only size() and isEmpty() are safe to be called concurrently.

  • Method Details

    • addHead

      void addHead(E e, int priority)
    • addTail

      void addTail(E e, int priority)
    • addSorted

      void addSorted(E e, int priority)
    • poll

      E poll()
    • peek

      E peek()
      just look at the first element on the list
    • clear

      void clear()
    • setNodeStore

      void setNodeStore(Supplier<NodeStore<E>> supplier)
      See Also:
    • removeWithID

      E removeWithID(String listID, long id)
    • size

      int size()
      Returns the size of this list; safe to be called concurrently.
      Returns:
      the size of this list; safe to be called concurrently
    • iterator

      LinkedListIterator<E> iterator()
    • isEmpty

      boolean isEmpty()
      Returns true if empty, false otherwise; safe to be called concurrently.
      Returns:
      true if empty, false otherwise; safe to be called concurrently