public abstract class Queue<T> extends QueueAbstract<T>
| Modifier and Type | Field and Description |
|---|---|
T[] |
array
Used by the Queue to store objects.
|
factor| Constructor and Description |
|---|
Queue(int factor,
int max)
Constructor for the Queue object.
|
Queue(int factor,
int init_size,
int delta)
Constructor for the Queue object
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(T obj)
Add the given object to the end of the queue.
|
int |
capacity()
Return the capacity of this Queue as defined in the constructor.
|
void |
clear()
Description of the Method
|
void |
cutOffLast()
Shrink the Queue by 1 (the last) position.
|
void |
expand()
Description of the Method
|
T |
item(int index)
Return the object at the given position in the Queue.
|
void |
itemto(int index,
T obj)
Insert the given object in the Queue at the specified position.
|
int |
lowestSonOf(int father)
Find an item with the lowest value amongst sons of a father.
|
int |
size()
Return the number of elements in the queue.
|
public transient T[] array
public Queue(int factor,
int max)
max - the maximum size desired for the Queuepublic Queue(int factor,
int init_size,
int delta)
init_size - Description of the Parameterdelta - Description of the Parameterpublic final void clear()
public final void expand()
expand in class QueueAbstract<T>public final int size()
size in class QueueAbstract<T>public final T item(int index)
item in class QueueAbstract<T>index - the position of the desired objectpublic final int capacity()
capacity in class QueueAbstract<T>public final void itemto(int index,
T obj)
itemto in class QueueAbstract<T>index - the position at which to insertobj - the object to insertpublic final int lowestSonOf(int father)
QueueAbstractlowestSonOf in class QueueAbstract<T>public final void cutOffLast()
cutOffLast in class QueueAbstract<T>public final void append(T obj)
append in class QueueAbstract<T>obj - the object to appendCopyright © 2016 Egothor. All Rights Reserved.