|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.util.queue.QueueImpl
drcl.util.queue.VariableSizeQueueImpl
drcl.util.queue.VSBSQueue
Variable-size version of BSQueue.
| Nested Class Summary | |
protected static class |
VSBSQueue.__Element
|
protected static class |
VSBSQueue._SizedElement
|
| Constructor Summary | |
VSBSQueue()
|
|
| Method Summary | |
Element[] |
_retrieveAll()
Returns all the elements in the queue sorted in the ascending order of the key values and the order of enqueues. |
boolean |
contains(java.lang.Object element_)
Returns true if the queue contains the element. |
boolean |
containsKey(double key_)
Returns true if the queue contains the key. |
java.lang.Object |
dequeue()
Dequeues and returns the element with the smallest key. |
java.lang.Object |
dequeue(double key_)
Dequeues and returns the first element with the key matched the argument. |
void |
enqueue(double key_,
java.lang.Object element_)
Enqueues the element with the associated key. |
void |
enqueue(double key_,
java.lang.Object element_,
int size_)
Enqueues the element with the associated key. |
void |
enqueue(java.lang.Object element_,
int size_)
Associates the element with the largest key in the queue and then enqueues the element. |
boolean |
enqueueAfter(java.lang.Object previousElement_,
java.lang.Object element_)
Enqueues the element right after the previousElement_
element and
associates the element with a key equal to the previous element's. |
boolean |
enqueueAfter(java.lang.Object previousElement_,
java.lang.Object element_,
int size_)
Enqueues the element right after the previousElement_
element and associates the element with a key equal to the previous
element's. |
boolean |
enqueueAt(int pos_,
double key_,
java.lang.Object element_)
Enqueues the element at the position specified with the associated key. |
boolean |
enqueueAt(int pos_,
double key_,
java.lang.Object element_,
int size_)
Enqueues the element at the position specified with the associated key. |
java.lang.Object |
firstElement()
Returns the first element in the queue, no dequeue is performed. |
double |
firstKey()
Returns the first key in the queue, no dequeue is performed. |
java.util.Enumeration |
getElementEnumerator()
|
java.util.Enumeration |
getKeyEnumerator()
|
int |
getLength()
Returns the current length of the queue. |
int |
getSize()
Returns the current size of the queue. |
double[] |
keys()
Returns all the keys in the queue. |
java.lang.Object |
lastElement()
Returns the last element in the queue, no dequeue is performed. |
double |
lastKey()
Returns the last key in the queue, no dequeue is performed. |
java.lang.String |
oneline()
Prints the content of the queue in one line of string. |
java.lang.Object |
remove(double key_,
java.lang.Object element_)
Removes the first element that has the same key and equals()
the argument. |
java.lang.Object |
remove(int n_)
Removes and returns the nth element in the queue. |
java.lang.Object |
remove(java.lang.Object element_)
Removes the first element that equals() the argument. |
void |
removeAll(double key_,
java.lang.Object element_)
Removes all the elements that match both the argument key and element. |
void |
removeAll(java.lang.Object element_)
Removes all the elements that equals() the argument. |
void |
reset()
Empties the queue. |
java.lang.Object[] |
retrieveAll()
Returns all the elements in the queue sorted in the ascending order of the key values and the order of enqueues. |
java.lang.Object[] |
retrieveAll(double key_)
Returns all the elements with the keys matched to the argument. |
java.lang.Object |
retrieveAt(int n_)
Returns the nth element in the queue, no dequeue is performed. |
java.lang.Object |
retrieveBy(double key_)
Returns the first element with the key matched to the argument. |
double |
retrieveKey(java.lang.Object o_)
Returns the key of the first matched element in this queue, Double.NaN if no match is found. |
double |
retrieveKeyAt(int n_)
Returns the nth key in the queue, Double.NaN if the current length of the queue is smaller than (n+1). |
| Methods inherited from class drcl.util.queue.VariableSizeQueueImpl |
duplicate, info, merge |
| Methods inherited from class drcl.util.queue.QueueImpl |
diag, enqueue, info, info, isEmpty |
| Methods inherited from class drcl.DrclObj |
clone, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface drcl.util.queue.Queue |
diag, enqueue, info, info, isEmpty |
| Constructor Detail |
public VSBSQueue()
| Method Detail |
public void reset()
Queue
reset in interface Queuereset in class QueueImpl
public void enqueue(double key_,
java.lang.Object element_)
Queue
enqueue in interface Queueenqueue in class VariableSizeQueueImpl
public void enqueue(double key_,
java.lang.Object element_,
int size_)
VariableSizeQueue
enqueue in interface VariableSizeQueueenqueue in class VariableSizeQueueImpl
public boolean enqueueAfter(java.lang.Object previousElement_,
java.lang.Object element_)
QueuepreviousElement_
element and
associates the element with a key equal to the previous element's.
enqueueAfter in interface QueueenqueueAfter in class VariableSizeQueueImpl
public boolean enqueueAfter(java.lang.Object previousElement_,
java.lang.Object element_,
int size_)
VariableSizeQueuepreviousElement_
element and associates the element with a key equal to the previous
element's.
enqueueAfter in interface VariableSizeQueueenqueueAfter in class VariableSizeQueueImpl
public boolean enqueueAt(int pos_,
double key_,
java.lang.Object element_)
Queue
enqueueAt in interface QueueenqueueAt in class VariableSizeQueueImpl
public boolean enqueueAt(int pos_,
double key_,
java.lang.Object element_,
int size_)
VariableSizeQueue
enqueueAt in interface VariableSizeQueueenqueueAt in class VariableSizeQueueImpl
public void enqueue(java.lang.Object element_,
int size_)
VariableSizeQueue
enqueue in interface VariableSizeQueueenqueue in class VariableSizeQueueImplpublic java.lang.Object dequeue()
Queue
dequeue in interface Queuedequeue in class QueueImplpublic java.lang.Object dequeue(double key_)
Queue
dequeue in interface Queuedequeue in class QueueImplpublic java.lang.Object remove(java.lang.Object element_)
Queueequals() the argument.
remove in interface Queueremove in class QueueImpl
public java.lang.Object remove(double key_,
java.lang.Object element_)
Queueequals()
the argument.
remove in interface Queueremove in class QueueImplpublic void removeAll(java.lang.Object element_)
Queueequals() the argument.
removeAll in interface QueueremoveAll in class QueueImpl
public void removeAll(double key_,
java.lang.Object element_)
Queue
removeAll in interface QueueremoveAll in class QueueImplpublic java.lang.Object remove(int n_)
Queue
remove in interface Queueremove in class QueueImplpublic java.lang.Object firstElement()
Queue
firstElement in interface QueuefirstElement in class QueueImplpublic double firstKey()
Queuejava.lang.Double.NaN if the queue is empty.
firstKey in interface QueuefirstKey in class QueueImplpublic java.lang.Object lastElement()
Queue
lastElement in interface QueuelastElement in class QueueImplpublic double lastKey()
Queuejava.lang.Double.NaN if the queue is empty.
lastKey in interface QueuelastKey in class QueueImplpublic java.lang.Object retrieveAt(int n_)
Queue
retrieveAt in interface QueueretrieveAt in class QueueImplpublic double retrieveKeyAt(int n_)
Queue
retrieveKeyAt in interface QueueretrieveKeyAt in class QueueImplpublic java.lang.Object retrieveBy(double key_)
Queue
retrieveBy in interface QueueretrieveBy in class QueueImplpublic java.lang.Object[] retrieveAll(double key_)
Queue
retrieveAll in interface QueueretrieveAll in class QueueImplpublic java.lang.Object[] retrieveAll()
Queue
retrieveAll in interface QueueretrieveAll in class QueueImplpublic Element[] _retrieveAll()
Queue
_retrieveAll in interface Queue_retrieveAll in class QueueImplpublic double retrieveKey(java.lang.Object o_)
Queue
retrieveKey in interface QueueretrieveKey in class QueueImplpublic boolean contains(java.lang.Object element_)
Queue
contains in interface Queuecontains in class QueueImplpublic boolean containsKey(double key_)
Queue
containsKey in interface QueuecontainsKey in class QueueImplpublic double[] keys()
Queue
keys in interface Queuekeys in class QueueImplpublic java.util.Enumeration getKeyEnumerator()
getKeyEnumerator in interface QueuegetKeyEnumerator in class QueueImplpublic java.util.Enumeration getElementEnumerator()
getElementEnumerator in interface QueuegetElementEnumerator in class QueueImplpublic int getSize()
VariableSizeQueue
getSize in interface VariableSizeQueuegetSize in class VariableSizeQueueImplpublic int getLength()
Queue
getLength in interface QueuegetLength in class QueueImplpublic java.lang.String oneline()
Queue
oneline in interface Queueoneline in class QueueImpl
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||