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.Decodercopy()booleanhasMoreTokens()booleanhasNext()Stringnext()booleannextBoolean(boolean defaultValue)charnextChar(char defaultValue)Return the first character of the next tokenColornextColor(Color defaultValue)doublenextDouble(double defaultValue)intnextInt(int defaultValue)Parse the next token into an integerKeyStrokenextKeyStroke(char defaultValue)KeyStrokenextKeyStroke(KeyStroke defaultValue)longnextLong(long defaultValue)NamedKeyStrokenextNamedKeyStroke()NamedKeyStrokenextNamedKeyStroke(char defaultValue)NamedKeyStrokenextNamedKeyStroke(NamedKeyStroke defaultValue)String[]nextStringArray(int minLength)StringnextToken()StringnextToken(String defaultValue)Return the next token, or the default value if there are no more tokensvoidremove()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-