AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
AbstractQueue.java
Go to the documentation of this file.
1package aud.adt;
2
3import java.util.NoSuchElementException;
4
8public abstract class AbstractQueue<T> {
9
11 protected AbstractQueue() {}
12
14 public abstract boolean is_empty();
15
21 public abstract T front();
22
28 public abstract T dequeue();
29
33 public abstract void enqueue(T x);
34
35 @Override
36 public String toString() { return "AbstractQueue"; }
37}
Interface for an ADT queue.
abstract boolean is_empty()
Is queue empty?
abstract void enqueue(T x)
Enqueue element at end of queue.
AbstractQueue()
create empty queue
abstract T front()
Get front element of queue.
abstract T dequeue()
Remove front element from queue.