package speiger.src.collections.PACKAGE.queues; /** * A Type Speciifc PriorityDeque or Dequeue interface to allow implementations like FIFO queues. * @Type(T) */ public interface PRIORITY_DEQUEUE KEY_GENERIC_TYPE extends PRIORITY_QUEUE KEY_GENERIC_TYPE { /** * Method to insert a element into the first Index instead of the last. * @param e the element that should be inserted into the first place */ public void enqueueFirst(KEY_TYPE e); /** * A Method to remove a element from the last place instead of the first * @return the last element inserted * @throws java.util.NoSuchElementException if no element is in the deque */ public KEY_TYPE dequeueLast(); /** * Peeking function for the last element * @return the Last Element within the dequeue without deleting it */ public default KEY_TYPE last() { return peek(size()-1); } }