|
DRCL J-Sim 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.CalendarQueue2
| Constructor Summary | |
CalendarQueue2()
|
|
| Method Summary | |
drcl.util.queue._Element |
_dequeue()
|
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 o_)
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. |
java.lang.String |
diag(boolean listElement_)
Prints out for diagnosis. |
void |
enqueue(double key_,
java.lang.Object o_)
Enqueues the element with the associated key. |
void |
enqueue(java.lang.Object o_)
Associates the element with the largest key in the queue and then enqueues the element. |
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()
|
java.lang.String |
info()
Prints the content of the queue. |
java.lang.String |
info(java.lang.String prefix_)
Prints the content of the queue. |
boolean |
isEmpty()
Returns true if the queue is empty. |
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 obj_)
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 obj_)
Removes the first element that equals() the argument. |
void |
removeAll(double key_,
java.lang.Object o_)
Removes all the elements that match both the argument key and element. |
void |
removeAll(java.lang.Object o_)
Removes all the elements that equals() the argument. |
void |
reset()
Empties the queue. |
void |
resize(int newsize_)
|
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.QueueImpl |
duplicate, enqueueAfter, enqueueAt, info, merge |
| Methods inherited from class drcl.DrclObj |
clone, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CalendarQueue2()
| Method Detail |
public void enqueue(double key_,
java.lang.Object o_)
Queue
enqueue in interface Queueenqueue in class QueueImplpublic java.lang.Object dequeue()
Queue
dequeue in interface Queuedequeue in class QueueImplpublic drcl.util.queue._Element _dequeue()
public double firstKey()
Queuejava.lang.Double.NaN if the queue is empty.
firstKey in interface QueuefirstKey in class QueueImplpublic java.lang.Object firstElement()
Queue
firstElement in interface QueuefirstElement in class QueueImplpublic void resize(int newsize_)
public java.lang.Object remove(double key_,
java.lang.Object obj_)
Queueequals()
the argument.
remove in interface Queueremove in class QueueImplpublic java.lang.Object remove(java.lang.Object obj_)
Queueequals() the argument.
remove in interface Queueremove in class QueueImplpublic boolean isEmpty()
Queue
isEmpty in interface QueueisEmpty in class QueueImplpublic int getSize()
public int getLength()
Queue
getLength in interface QueuegetLength in class QueueImplpublic double[] keys()
Queue
keys in interface Queuekeys in class QueueImplpublic java.lang.Object[] retrieveAll()
Queue
retrieveAll in interface QueueretrieveAll in class QueueImplpublic void reset()
Queue
reset in interface Queuereset in class QueueImplpublic java.lang.String info(java.lang.String prefix_)
info in interface Queueinfo in class QueueImplprefix_ - prefix of each line when printing.public java.lang.String info()
info in interface Queueinfo in class QueueImplpublic java.lang.String oneline()
oneline in interface Queueoneline in class QueueImplpublic java.lang.String diag(boolean listElement_)
QueueImplQueueImpl.info().
diag in interface Queuediag in class QueueImplpublic java.util.Enumeration getElementEnumerator()
getElementEnumerator in interface QueuegetElementEnumerator in class QueueImplpublic java.util.Enumeration getKeyEnumerator()
getKeyEnumerator in interface QueuegetKeyEnumerator in class QueueImplpublic void enqueue(java.lang.Object o_)
Queue
enqueue in interface Queueenqueue in class QueueImplpublic java.lang.Object[] retrieveAll(double key_)
Queue
retrieveAll in interface QueueretrieveAll in class QueueImplpublic double retrieveKey(java.lang.Object o_)
Queue
retrieveKey in interface QueueretrieveKey in class QueueImplpublic java.lang.Object dequeue(double key_)
Queue
dequeue in interface Queuedequeue in class QueueImplpublic java.lang.Object retrieveBy(double key_)
Queue
retrieveBy in interface QueueretrieveBy in class QueueImplpublic void removeAll(java.lang.Object o_)
Queueequals() the argument.
removeAll in interface QueueremoveAll in class QueueImpl
public void removeAll(double key_,
java.lang.Object o_)
Queue
removeAll in interface QueueremoveAll in class QueueImplpublic double lastKey()
Queuejava.lang.Double.NaN if the queue is empty.
lastKey in interface QueuelastKey in class QueueImplpublic java.lang.Object lastElement()
Queue
lastElement in interface QueuelastElement in class QueueImplpublic double retrieveKeyAt(int n_)
Queue
retrieveKeyAt in interface QueueretrieveKeyAt in class QueueImplpublic java.lang.Object retrieveAt(int n_)
Queue
retrieveAt in interface QueueretrieveAt in class QueueImplpublic java.lang.Object remove(int n_)
Queue
remove in interface Queueremove in class QueueImplpublic boolean containsKey(double key_)
Queue
containsKey in interface QueuecontainsKey in class QueueImplpublic Element[] _retrieveAll()
Queue
_retrieveAll in interface Queue_retrieveAll in class QueueImplpublic boolean contains(java.lang.Object o_)
Queue
contains in interface Queuecontains in class QueueImpl
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||