Package org.mozilla.zest.core.v1
Class ZestStatement
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestStatement
-
- Direct Known Subclasses:
ZestAction,ZestAssignment,ZestClient,ZestComment,ZestConditional,ZestControl,ZestLoop,ZestRequest,ZestScript
public abstract class ZestStatement extends ZestElement
The base abstract class that all Zest statements must extend.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestStatement()Instantiates a new zest statement.ZestStatement(int index)Instantiates a new zest statement.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ZestStatementdeepCopy()Deep copy.intgetIndex()Gets the index.ZestStatementgetNext()Gets the next.ZestStatementgetPrevious()Gets the previous.protected voidinit()protected voidinsertAfter(ZestStatement stmt)Insert after.protected voidinsertBefore(ZestStatement stmt)Insert before.booleanisEnabled()abstract booleanisPassive()Checks if is passive.booleanisSameSubclass(ZestElement ze)Checks if is same subclass.protected voidremove()Removes the.voidsetEnabled(boolean enabled)protected voidsetNext(ZestStatement next)Sets the next.protected ZestStatementsetPrev(ZestStatement prev)-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, setElementType
-
-
-
-
Method Detail
-
isSameSubclass
public boolean isSameSubclass(ZestElement ze)
Description copied from class:ZestElementChecks if is same subclass.- Overrides:
isSameSubclassin classZestElement- Parameters:
ze- the ze- Returns:
- true, if is same subclass
-
getPrevious
public ZestStatement getPrevious()
Gets the previous.- Returns:
- the previous
-
insertBefore
protected void insertBefore(ZestStatement stmt)
Insert before.- Parameters:
stmt- the stmt
-
insertAfter
protected void insertAfter(ZestStatement stmt)
Insert after.- Parameters:
stmt- the stmt
-
remove
protected void remove()
Removes the.
-
getNext
public ZestStatement getNext()
Gets the next.- Returns:
- the next
-
setNext
protected void setNext(ZestStatement next)
Sets the next.- Parameters:
next- the new next
-
getIndex
public int getIndex()
Gets the index.- Returns:
- the index
-
deepCopy
public abstract ZestStatement deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin classZestElement- Returns:
- the zest element
-
init
protected void init()
-
setPrev
protected ZestStatement setPrev(ZestStatement prev)
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
isPassive
public abstract boolean isPassive()
Checks if is passive.- Returns:
- true, if is passive
-
-