|
||||||||||
| 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.AnimalArrayBasedStackGenerator<T>
public class AnimalArrayBasedStackGenerator<T>
| Field Summary |
|---|
| Fields inherited from class algoanim.primitives.generators.Generator |
|---|
lang |
| Constructor Summary | |
|---|---|
AnimalArrayBasedStackGenerator(Language aLang)
|
|
| Method Summary | |
|---|---|
void |
create(ArrayBasedStack<T> abs)
Creates the originating script code for a given ArrayBasedStack,
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 |
highlightTopCell(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Highlights the cell which contains the top element of the given ArrayBasedStack. |
void |
highlightTopElem(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Highlights the top element of the given ArrayBasedStack. |
void |
isEmpty(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Tests if the given ArrayBasedStack is empty. |
void |
isFull(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Tests if the given ArrayBasedStack is full. |
void |
pop(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Removes the element at the top of the given ArrayBasedStack. |
void |
push(ArrayBasedStack<T> abs,
T elem,
Timing delay,
Timing duration)
Pushes the element elem onto the top of the given ArrayBasedStack. |
void |
top(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Retrieves (without removing) the element at the top of the given ArrayBasedStack. |
void |
unhighlightTopCell(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Unhighlights the cell which contains the top element of the given ArrayBasedStack. |
void |
unhighlightTopElem(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
Unhighlights the top element of the given ArrayBasedStack. |
| 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 AnimalArrayBasedStackGenerator(Language aLang)
| Method Detail |
|---|
public void create(ArrayBasedStack<T> abs)
ArrayBasedStackGeneratorArrayBasedStack,
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 ArrayBasedStackGenerator<T>abs - the ArrayBasedStack for which the initiate script code
shall be created.
public void isFull(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack is full.
isFull in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack which is tested.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void pop(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack.
pop in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack from which to pop the element.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void push(ArrayBasedStack<T> abs,
T elem,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorelem onto the top of the given ArrayBasedStack.
push in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack onto the top of which to push the element.elem - the element to be pushed onto the stack.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void top(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack.
top in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack from which to retrieve the top element.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void isEmpty(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack is empty.
isEmpty in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack which is tested.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void highlightTopCell(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack.
highlightTopCell in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void highlightTopElem(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack.
highlightTopElem in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void unhighlightTopCell(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack.
unhighlightTopCell in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack to work on.delay - [optional] the time to wait until the operation shall be performed.duration - [optional] the duration of the operation.
public void unhighlightTopElem(ArrayBasedStack<T> abs,
Timing delay,
Timing duration)
ArrayBasedStackGeneratorArrayBasedStack.
unhighlightTopElem in interface ArrayBasedStackGenerator<T>abs - the ArrayBasedStack 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 | |||||||||