Interface TLongQueue

All Superinterfaces:
TLongCollection

public interface TLongQueue extends TLongCollection
Interface for Trove queue implementations.
See Also:
  • Method Details

    • element

      long element()
      Retrieves and removes the head of this queue. This method differs from poll() only in that it throws an exception if this queue is empty.
    • offer

      boolean offer(long e)
      Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions. When using a capacity-restricted queue, this method is generally preferable to TLongCollection.add(long), which can fail to insert an element only by throwing an exception.
      Parameters:
      e - The element to add.
      Returns:
      true if the element was added to this queue, else false
    • peek

      long peek()
      Retrieves, but does not remove, the head of this queue, or returns TLongCollection.getNoEntryValue() if this queue is empty.
      Returns:
      the head of this queue, or TLongCollection.getNoEntryValue() if this queue is empty
    • poll

      long poll()
      Retrieves and removes the head of this queue, or returns TLongCollection.getNoEntryValue() if this queue is empty.
      Returns:
      the head of this queue, or TLongCollection.getNoEntryValue() if this queue is empty