Package org.mozilla.zest.core.v1
Class ZestLoopTokenFileSet
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestLoopTokenFileSet
-
- All Implemented Interfaces:
ZestLoopTokenSet<String>
public class ZestLoopTokenFileSet 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 ZestLoopTokenFileSet(String pathToFile)Instantiates a new zest loop token file set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestLoopTokenFileSetdeepCopy()Deep copy.protected ZestLoopTokenStringSetgetConvertedSet()Gets the converted set.FilegetFile()Gets the file.StringgetFilePath()ZestLoopStateFilegetFirstState()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()intindexOf(String token)returns the index of a given token.intsize()returns the size of this set.-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, isSameSubclass, setElementType
-
-
-
-
Constructor Detail
-
ZestLoopTokenFileSet
public ZestLoopTokenFileSet(String pathToFile) throws FileNotFoundException
Instantiates a new zest loop token file set.- Parameters:
pathToFile- the path to file- Throws:
FileNotFoundException- the file not found exception
-
-
Method Detail
-
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 ZestLoopTokenFileSet deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestLoopTokenSet<String>- Specified by:
deepCopyin classZestElement- Returns:
- the zest element
-
getFile
public File getFile()
Gets the file.- Returns:
- the file
-
getFilePath
public String getFilePath()
-
getConvertedSet
protected ZestLoopTokenStringSet getConvertedSet()
Gets the converted set.- Returns:
- the converted set
-
getFirstState
public ZestLoopStateFile getFirstState()
Description copied from interface:ZestLoopTokenSetGets the first state.- Specified by:
getFirstStatein interfaceZestLoopTokenSet<String>- Returns:
- the first state
-
-