Interface QueueInterface<T>

Type Parameters:
T - The type of the objects in the queue.
All Known Implementing Classes:
LinkedQueue

public interface QueueInterface<T>
An interface for the ADT queue.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all entries from this queue.
    Removes and returns the entry at the front of this queue.
    void
    enqueue(T newEntry)
    Adds a new entry to the back of this queue.
    Retrieves the entry at the front of this queue.
    boolean
    Checks whether this queue is empty.
  • Method Details

    • enqueue

      void enqueue(T newEntry)
      Adds a new entry to the back of this queue.
      Parameters:
      newEntry - The entry to add to the queue.
    • dequeue

      T dequeue()
      Removes and returns the entry at the front of this queue.
      Returns:
      The entry at the front of the queue.
    • getFront

      T getFront()
      Retrieves the entry at the front of this queue.
      Returns:
      The entry at the front of the queue.
    • isEmpty

      boolean isEmpty()
      Checks whether this queue is empty.
      Returns:
      True if the queue is empty, false otherwise.
    • clear

      void clear()
      Removes all entries from this queue. The queue will be empty after this method returns.