public abstract class QueueList<E extends Entity>
extends java.lang.Object
implements java.beans.PropertyChangeListener, java.lang.Iterable<E>
QueueListStandard and are specified e.g. in QueueListFifo
or QueueListLifo.QueueBased,
Queue,
ProcessQueue,
QueueListFifo,
QueueListLifo| Constructor and Description |
|---|
QueueList() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
contains(E e)
Should return
true if the given Entity is
contained in the queue; false otherwise. |
abstract E |
first()
Should return the first entity in the queue.
|
abstract int |
get(E element)
Returns the position of the named
Entity. |
abstract E |
get(int index)
Returns the
Entity queued at the named position. |
abstract java.lang.String |
getAbbreviation()
Should return an abbreviation as a String to identify the sort of
queueing discipline (like FIFO or LIFO or ...).
|
abstract void |
insert(E e)
Should add a new Entity to the queue.
|
abstract boolean |
isEmpty()
Should return
true if no entities are stored in the queue
at the moment, false otherwise. |
java.util.Iterator<E> |
iterator()
Returns an iterator over the entities enqueued.
|
abstract E |
last()
Should return the last
Entity in the queue. |
abstract boolean |
remove(E e)
Should remove the given
Entity "e" from the queue. |
abstract boolean |
remove(int index)
Removes the
Entity queued at the named position |
void |
setQueueBased(QueueBased queueBase)
Sets the client queue for which the entities are stored.
|
int |
size()
Returns the actual size of the QueueList.
|
abstract E |
succ(E e)
Should return the successor of the given
Entity "e" in the
queue. |
abstract java.lang.String |
toString()
Should return a string representation of the queue.
|
public abstract boolean contains(E e)
true if the given Entity is
contained in the queue; false otherwise.e - E : The Entity we are looking for
in the queue.true if the given
Entity is contained in the queue;
false otherwise.public abstract E first()
public abstract E get(int index)
Entity queued at the named position.
The first position is 0, the last one size()-1.Entity at the position of
int or null if no such position exists.public abstract int get(E element)
Entity.
The first position is 0, the last one size()-1.Entity or -1 if no such exists.public abstract java.lang.String getAbbreviation()
public abstract void insert(E e)
e - E : The Entity which will be added to the queuepublic abstract boolean isEmpty()
true if no entities are stored in the queue
at the moment, false otherwise.true if no entities are stored in the
queue at the moment, false otherwise.public abstract E last()
Entity in the queue.Entity in the queue.public abstract boolean remove(E e)
Entity "e" from the queue. If this
is done successfully true is returned, false
otherwise.e - E : The Entity which is to be
removed from the queue.true if the given Entity
is removed successfully, false otherwise.public abstract boolean remove(int index)
Entity queued at the named position.
* The first position is 0, the last one size()-1.true as the Entity
exists or false> if otherwise.public void setQueueBased(QueueBased queueBase)
queueBase - desmoj.QueueBased : The QueueBased using this queueing system.public int size()
int.
The value is 0 if no Entity is in line.public abstract E succ(E e)
Entity "e" in the
queue.e - E : The successor of this Entity
will be returned.Entity after the given
Entity "e" in the queue.public abstract java.lang.String toString()
toString in class java.lang.Object