Interface ObjIdQueue


@NotThreadSafe public interface ObjIdQueue
A queue of ObjId's, where ObjId's can be added or removed one at a time.

Instances allow duplicates.

Instances are not thread safe.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(ObjId id)
    Add an ObjId to this queue.
    boolean
    Determine whether this instance is empty.
    Remove and return the next ObjId from this queue.
    int
    Get the number of ObjId's in this queue.
  • Method Details

    • add

      void add(ObjId id)
      Add an ObjId to this queue.
      Parameters:
      id - the ObjId to add
      Throws:
      IllegalArgumentException - if id is null
      IllegalStateException - if the maximum capacity is exceeded
    • next

      ObjId next()
      Remove and return the next ObjId from this queue.
      Returns:
      the next ObjId
      Throws:
      NoSuchElementException - if this queue is empty
    • size

      int size()
      Get the number of ObjId's in this queue.
      Returns:
      current size
    • isEmpty

      boolean isEmpty()
      Determine whether this instance is empty.
      Returns:
      true if empty, otherwise false