Package VASSAL.tools
Class SequenceEncoder.Decoder
java.lang.Object
VASSAL.tools.SequenceEncoder.Decoder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
boolean
boolean
hasNext()
next()
boolean
nextBoolean
(boolean defaultValue) char
nextChar
(char defaultValue) Return the first character of the next tokendouble
nextDouble
(double defaultValue) int
nextInt
(int defaultValue) Parse the next token into an integernextKeyStroke
(char defaultValue) nextKeyStroke
(KeyStroke defaultValue) long
nextLong
(long defaultValue) nextNamedKeyStroke
(char defaultValue) nextNamedKeyStroke
(NamedKeyStroke defaultValue) String[]
nextStringArray
(int minLength) 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() -
getRemaining
-
nextToken
-
hasNext
-
next
-
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:
- next token as an integer, or defaultValue if it didn't exist or didn't parse
-
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:
- next token if a character is available, or defaultValue if no more tokens or the token has zero length
-
nextKeyStroke
-
nextColor
-
nextKeyStroke
-
nextNamedKeyStroke
-
nextNamedKeyStroke
-
nextNamedKeyStroke
-
nextToken
-
nextStringArray
-