|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalgoanim.primitives.generators.Generator
algoanim.animalscript.AnimalGenerator
algoanim.animalscript.AnimalArrayBasedQueueGenerator<T>
public class AnimalArrayBasedQueueGenerator<T>
| Field Summary |
|---|
| Fields inherited from class algoanim.primitives.generators.Generator |
|---|
lang |
| Constructor Summary | |
|---|---|
AnimalArrayBasedQueueGenerator(Language aLang)
|
|
| Method Summary | |
|---|---|
void |
create(ArrayBasedQueue<T> abq)
Creates the originating script code for a given ArrayBasedQueue,
due to the fact that before a primitive can be worked with it has to be
defined and made known to the script language. |
void |
dequeue(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Removes the first element of the given ArrayBasedQueue. |
void |
enqueue(ArrayBasedQueue<T> abq,
T elem,
Timing delay,
Timing duration)
Adds the element elem as the last element to the end of the given
ArrayBasedQueue. |
void |
front(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Retrieves (without removing) the first element of the given ArrayBasedQueue. |
void |
highlightFrontCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Highlights the cell which contains the first element of the given ArrayBasedQueue. |
void |
highlightFrontElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Highlights the first element of the given ArrayBasedQueue. |
void |
highlightTailCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Highlights the cell which contains the last element of the given ArrayBasedQueue. |
void |
highlightTailElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Highlights the last element of the given ArrayBasedQueue. |
void |
isEmpty(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Tests if the given ArrayBasedQueue is empty. |
void |
isFull(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Tests if the given ArrayBasedQueue is full. |
void |
tail(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Retrieves (without removing) the last element of the given ArrayBasedQueue. |
void |
unhighlightFrontCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Unhighlights the cell which contains the first element of the given ArrayBasedQueue. |
void |
unhighlightFrontElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Unhighlights the first element of the given ArrayBasedQueue. |
void |
unhighlightTailCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Unhighlights the cell which contains the last element of the given ArrayBasedQueue. |
void |
unhighlightTailElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
Unhighlights the last element of the given ArrayBasedQueue. |
| Methods inherited from class algoanim.animalscript.AnimalGenerator |
|---|
addBooleanOption, addBooleanSwitch, addColorOption, addColorOption, addFontOption, addFontOption, addIntOption, addWithTiming, changeColor, exchange, hide, makeColorDef, makeColorDef, makeDisplayOptionsDef, makeDisplayOptionsDef, makeDurationTimingDef, makeHiddenDef, makeNodeDef, makeOffsetTimingDef, moveBy, moveTo, moveVia, rotate, rotate, show |
| Methods inherited from class algoanim.primitives.generators.Generator |
|---|
getLanguage, isNameUsed, isValidDirection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface algoanim.primitives.generators.GeneratorInterface |
|---|
changeColor, exchange, getLanguage, hide, moveBy, moveTo, moveVia, rotate, rotate, show |
| Constructor Detail |
|---|
public AnimalArrayBasedQueueGenerator(Language aLang)
| Method Detail |
|---|
public void create(ArrayBasedQueue<T> abq)
ArrayBasedQueueGeneratorArrayBasedQueue,
due to the fact that before a primitive can be worked with it has to be
defined and made known to the script language.
create in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue for which the initiate script code
shall be created.
public void dequeue(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
dequeue in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue from which to remove the first element.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void enqueue(ArrayBasedQueue<T> abq,
T elem,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorelem as the last element to the end of the given
ArrayBasedQueue.
enqueue in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to the end of which to add the element.elem - the element to be added to the end of the queue.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void front(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
front in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue from which to retrieve the first element.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void highlightFrontCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
highlightFrontCell in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void highlightFrontElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
highlightFrontElem in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void highlightTailCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
highlightTailCell in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void highlightTailElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
highlightTailElem in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void isEmpty(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue is empty.
isEmpty in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue which is tested.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void isFull(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue is full.
isFull in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue which is tested.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void tail(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
tail in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue from which to retrieve the last element.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void unhighlightFrontCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
unhighlightFrontCell in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void unhighlightFrontElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
unhighlightFrontElem in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void unhighlightTailCell(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
unhighlightTailCell in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void unhighlightTailElem(ArrayBasedQueue<T> abq,
Timing delay,
Timing duration)
ArrayBasedQueueGeneratorArrayBasedQueue.
unhighlightTailElem in interface ArrayBasedQueueGenerator<T>abq - the ArrayBasedQueue to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||