Package org.mozilla.zest.core.v1
Class ZestLoopRegex
- 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.ZestLoopRegex
-
- All Implemented Interfaces:
Enumeration<ZestStatement>,ZestContainer
public class ZestLoopRegex extends ZestLoop<String>
This class represent a loop through a list of regex matches for the given variable and pattern a file.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestLoopRegex()Instantiates a new zest loop regex.ZestLoopRegex(String variableName, String inputVariableName, String regex, int groupIndex, boolean caseExact)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestLoopRegexdeepCopy()Deep copy.voidendLoop()ZestLoopStateRegexgetCurrentState()returns the current state of the loop.StringgetCurrentToken()return the current token considered inside the loop.intgetGroupIndex()StringgetInputVariableName()StringgetRegex()ZestLoopTokenRegexSetgetSet()returns the set of the tokens in this loop.voidincrease()increase the loop indexesbooleanisCaseExact()booleanisLastState()checks if the loop is on its last statebooleanloop()voidsetCaseExact(boolean caseExact)voidsetGroupIndex(int groupIndex)voidsetInputVariableName(String variableName)voidsetRegex(String regex)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, setSet, 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
-
-
-
-
Method Detail
-
deepCopy
public ZestLoopRegex deepCopy()
Description copied from class:ZestElementDeep copy.
-
getCurrentState
public ZestLoopStateRegex getCurrentState()
Description copied from class:ZestLoopreturns the current state of the loop.- Overrides:
getCurrentStatein classZestLoop<String>- Returns:
- the current state
-
getSet
public ZestLoopTokenRegexSet getSet()
Description copied from class:ZestLoopreturns the set of the tokens in this loop.
-
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()
-
getInputVariableName
public String getInputVariableName()
-
getRegex
public String getRegex()
-
isCaseExact
public boolean isCaseExact()
-
setInputVariableName
public void setInputVariableName(String variableName)
-
setRegex
public void setRegex(String regex)
-
setCaseExact
public void setCaseExact(boolean caseExact)
-
getGroupIndex
public int getGroupIndex()
-
setGroupIndex
public void setGroupIndex(int groupIndex)
-
-