Package org.mozilla.zest.core.v1
Class ZestLoopString
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestStatement
-
- org.mozilla.zest.core.v1.ZestLoop<String>
-
- org.mozilla.zest.core.v1.ZestLoopString
-
- All Implemented Interfaces:
Enumeration<ZestStatement>,ZestContainer
public class ZestLoopString extends ZestLoop<String>
this class represents a Loop through String values.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestLoopString()Instantiates a new zest loop string.ZestLoopString(int index)Instantiates a new zest loop string.ZestLoopString(int index, String[] values)Instantiates a new zest loop string.ZestLoopString(String[] values)Instantiates a new zest loop string.ZestLoopString(String name, String[] values)Instantiates a new zest loop string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestLoopStringdeepCopy()Deep copy.voidendLoop()ZestLoopStateStringgetCurrentState()returns the current state of the loop.StringgetCurrentToken()return the current token considered inside the loop.ZestLoopTokenStringSetgetSet()returns the set of the tokens in this loop.String[]getValues()Gets the values.voidincrease()increase the loop indexesbooleanisLastState()checks if the loop is on its last statebooleanloop()voidsetSet(ZestLoopTokenSet<String> set)sets the current state to the new one (for subclasses).voidtoLastState()ends the loop taking its current state to the last state-
Methods inherited from class org.mozilla.zest.core.v1.ZestLoop
add, addStatement, copyStatements, endLoop, getChildBefore, getChildren, getCurrentIndex, getCurrentStatementIndex, getIndex, getLast, getRuntime, getStatement, getStatements, getVariableName, getVariableNames, hasMoreElements, init, init, isPassive, isSameSubclass, loop, move, nextElement, onControlBreak, onControlNext, setCurrentState, setPrefix, setPrev, setStatements, setVariableName
-
Methods inherited from class org.mozilla.zest.core.v1.ZestStatement
getIndex, getNext, getPrevious, init, insertAfter, insertBefore, isEnabled, remove, setEnabled, setNext
-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, setElementType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
-
-
-
Constructor Detail
-
ZestLoopString
public ZestLoopString()
Instantiates a new zest loop string.
-
ZestLoopString
public ZestLoopString(String name, String[] values)
Instantiates a new zest loop string.- Parameters:
name- the namevalues- the values
-
ZestLoopString
public ZestLoopString(String[] values)
Instantiates a new zest loop string.- Parameters:
values- the values
-
ZestLoopString
public ZestLoopString(int index)
Instantiates a new zest loop string.- Parameters:
index- the index of the statement loop.
-
ZestLoopString
public ZestLoopString(int index, String[] values)Instantiates a new zest loop string.- Parameters:
index- the index of the statementvalues- the values
-
-
Method Detail
-
getValues
public String[] getValues()
Gets the values.- Returns:
- the values
-
deepCopy
public ZestLoopString deepCopy()
Description copied from class:ZestElementDeep copy.
-
getCurrentState
public ZestLoopStateString getCurrentState()
Description copied from class:ZestLoopreturns the current state of the loop.- Overrides:
getCurrentStatein classZestLoop<String>- Returns:
- the current state
-
getSet
public ZestLoopTokenStringSet getSet()
Description copied from class:ZestLoopreturns the set of the tokens in this loop.
-
setSet
public void setSet(ZestLoopTokenSet<String> set)
Description copied from class:ZestLoopsets the current state to the new one (for subclasses).
-
isLastState
public boolean isLastState()
Description copied from class:ZestLoopchecks if the loop is on its last state- Specified by:
isLastStatein classZestLoop<String>- Returns:
- true if the loop is over
-
increase
public void increase()
Description copied from class:ZestLoopincrease the loop indexes
-
toLastState
public void toLastState()
Description copied from class:ZestLoopends the loop taking its current state to the last state- Specified by:
toLastStatein classZestLoop<String>
-
getCurrentToken
public String getCurrentToken()
Description copied from class:ZestLoopreturn the current token considered inside the loop.- Overrides:
getCurrentTokenin classZestLoop<String>- Returns:
- the current token considered inside the loop
-
loop
public boolean loop()
-
endLoop
public void endLoop()
-
-