|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.animator.AnimationQueue
public class AnimationQueue
This class implements a queue to hold AnimationMessages It is a shared data structure between Animator and Simulator Simulator puts messages on the queue and Animator takes messages off the queue
Constructor Summary | |
---|---|
AnimationQueue()
Contructor Initializes the queue |
Method Summary | |
---|---|
AnimationMessage |
dequeue()
Return and remove the message at the front of the queue Blocks using wait until message is available |
void |
enqueue(AnimationMessage am)
Add a message to the end of the queue Then notify any threads that may be waiting for this |
boolean |
isEmpty()
|
AnimationMessage |
top()
Return but do not remove the message at the front of the queue Blocks using wait until message is available |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnimationQueue()
Method Detail |
---|
public void enqueue(AnimationMessage am)
am
- AnimationMessage to be enqueuedpublic AnimationMessage top()
public AnimationMessage dequeue()
public boolean isEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |