Package org.mozilla.zest.core.v1
Class ZestLoopTokenClientElementsSet
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestLoopTokenClientElementsSet
-
- All Implemented Interfaces:
ZestLoopTokenSet<String>
public class ZestLoopTokenClientElementsSet extends ZestElement implements ZestLoopTokenSet<String>
The Class ZestLoopTokenFileSet.
This class does not override ZestLoopTokenStringSet because
the tokens inside the converted set must not be transient
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestLoopTokenClientElementsSet(ZestLoopClientElements loop, String windowHandle, String type, String element, String attribute)Instantiates a new zest loop token file set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestLoopTokenClientElementsSetdeepCopy()Deep copy.StringgetAttribute()protected ZestLoopTokenStringSetgetConvertedSet()private method for initialization of the loop (TokenSet & first state).StringgetElement()ZestLoopStateClientElementsgetFirstState()Gets the first state.StringgetLastToken()returns the last token the loop may consider.StringgetToken(int index)returns the token at a given index.List<String>getTokens()StringgetType()StringgetWindowHandle()intindexOf(String token)returns the index of a given token.voidsetAttribute(String attribute)voidsetConvertedSet(ZestLoopTokenStringSet convertedSet)voidsetElement(String element)voidsetLoop(ZestLoopClientElements loop)voidsetType(String type)voidsetWindowHandle(String windowHandle)intsize()returns the size of this set.-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, isSameSubclass, setElementType
-
-
-
-
Constructor Detail
-
ZestLoopTokenClientElementsSet
public ZestLoopTokenClientElementsSet(ZestLoopClientElements loop, String windowHandle, String type, String element, String attribute)
Instantiates a new zest loop token file set.- Parameters:
loop- the loop.windowHandle- the window handle.type- the type to select theelement.element- the name of the element(s).attribute- the attribute of the element, might benull.
-
-
Method Detail
-
getConvertedSet
protected ZestLoopTokenStringSet getConvertedSet() throws ZestClientFailException
private method for initialization of the loop (TokenSet & first state).- Returns:
- the zest loop token string set
- Throws:
ZestClientFailException
-
getToken
public String getToken(int index)
Description copied from interface:ZestLoopTokenSetreturns the token at a given index.- Specified by:
getTokenin interfaceZestLoopTokenSet<String>- Parameters:
index- the index of the token- Returns:
- the token at the given index
-
indexOf
public int indexOf(String token)
Description copied from interface:ZestLoopTokenSetreturns the index of a given token.- Specified by:
indexOfin interfaceZestLoopTokenSet<String>- Parameters:
token- the token whose index we are searching for- Returns:
- the index of the token
-
getLastToken
public String getLastToken()
Description copied from interface:ZestLoopTokenSetreturns the last token the loop may consider.- Specified by:
getLastTokenin interfaceZestLoopTokenSet<String>- Returns:
- the last token the loop may consider
-
size
public int size()
Description copied from interface:ZestLoopTokenSetreturns the size of this set.- Specified by:
sizein interfaceZestLoopTokenSet<String>- Returns:
- the size of this set
-
deepCopy
public ZestLoopTokenClientElementsSet deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestLoopTokenSet<String>- Specified by:
deepCopyin classZestElement- Returns:
- the zest element
-
getWindowHandle
public String getWindowHandle()
-
getElement
public String getElement()
-
setWindowHandle
public void setWindowHandle(String windowHandle)
-
setElement
public void setElement(String element)
-
getType
public String getType()
-
getAttribute
public String getAttribute()
-
setType
public void setType(String type)
-
setAttribute
public void setAttribute(String attribute)
-
setConvertedSet
public void setConvertedSet(ZestLoopTokenStringSet convertedSet)
-
getFirstState
public ZestLoopStateClientElements getFirstState()
Description copied from interface:ZestLoopTokenSetGets the first state.- Specified by:
getFirstStatein interfaceZestLoopTokenSet<String>- Returns:
- the first state
-
setLoop
public void setLoop(ZestLoopClientElements loop)
-
-