Package VASSAL.tools
Class SequenceEncoder.Decoder
java.lang.Object
VASSAL.tools.SequenceEncoder.Decoder
- Enclosing class:
- SequenceEncoder
public static class SequenceEncoder.Decoder extends Object implements Iterator<String>
-
Constructor Summary
Constructors Constructor Description Decoder(String value, char delimiter)
Decoder(SequenceEncoder.Decoder d)
-
Method Summary
Modifier and Type Method Description SequenceEncoder.Decoder
copy()
boolean
hasMoreTokens()
boolean
hasNext()
String
next()
boolean
nextBoolean(boolean defaultValue)
char
nextChar(char defaultValue)
Return the first character of the next tokenColor
nextColor(Color defaultValue)
double
nextDouble(double defaultValue)
int
nextInt(int defaultValue)
Parse the next token into an integerKeyStroke
nextKeyStroke(char defaultValue)
KeyStroke
nextKeyStroke(KeyStroke defaultValue)
long
nextLong(long defaultValue)
NamedKeyStroke
nextNamedKeyStroke()
NamedKeyStroke
nextNamedKeyStroke(char defaultValue)
NamedKeyStroke
nextNamedKeyStroke(NamedKeyStroke defaultValue)
String[]
nextStringArray(int minLength)
String
nextToken()
String
nextToken(String defaultValue)
Return the next token, or the default value if there are no more tokensvoid
remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
Decoder
-
Decoder
-
-
Method Details
-
hasMoreTokens
public boolean hasMoreTokens() -
nextToken
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
copy
-
nextInt
public int nextInt(int defaultValue)Parse the next token into an integer- Parameters:
defaultValue
- Return this value if no more tokens, or next token doesn't parse to an integer- Returns:
-
nextLong
public long nextLong(long defaultValue) -
nextDouble
public double nextDouble(double defaultValue) -
nextBoolean
public boolean nextBoolean(boolean defaultValue) -
nextChar
public char nextChar(char defaultValue)Return the first character of the next token- Parameters:
defaultValue
- Return this value if no more tokens, or if next token has zero length- Returns:
-
nextKeyStroke
-
nextColor
-
nextKeyStroke
-
nextNamedKeyStroke
-
nextNamedKeyStroke
-
nextNamedKeyStroke
-
nextToken
Return the next token, or the default value if there are no more tokens- Parameters:
defaultValue
-- Returns:
-
nextStringArray
-