Class CQueue<T>

java.lang.Object
io.perl.api.impl.CQueue<T>
All Implemented Interfaces:
Queue<T>

public final class CQueue<T> extends Object implements Queue<T>
  • Constructor Details

    • CQueue

      public CQueue()
  • Method Details

    • pollOnce

      public T pollOnce()
    • poll

      public T poll()
      Description copied from interface: Queue
      Return data of type T from queue, or null if none is available.
      Specified by:
      poll in interface Queue<T>
    • add

      public boolean add(T data)
      Description copied from interface: Queue
      Add data of type T to queue.
      Specified by:
      add in interface Queue<T>
      Parameters:
      data - element to add to the queue
      Returns:
      true if the element was added successfully
    • clear

      public void clear()
      Description copied from interface: Queue
      Clear queue and reset internal state.
      Specified by:
      clear in interface Queue<T>