Package gamedata
Class ClassMap.Parser
- java.lang.Object
-
- gamedata.ResourceParser<ClassMap.Entry>
-
- gamedata.ClassMap.Parser
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- ClassMap
public static final class ClassMap.Parser extends ResourceParser<ClassMap.Entry>
A parser for class map files.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassMap.Entrynext()Returns the next entry in the class map, ornullif the last entry has been reached.-
Methods inherited from class gamedata.ResourceParser
close, error, errorMessage, getIdentifier, getIdentifierString, getLanguage, getLineNumber, isParsingGently, readLine, readNonemptyLine, readProperty, readProperty, setIdentifier, setLanguage, warning
-
-
-
-
Constructor Detail
-
Parser
public Parser(java.lang.String resource, boolean gentle) throws java.io.IOExceptionCreates a parser for the specified resource file.- Parameters:
resource- the location of the desired tile set resourcegentle- iftrue, parses in gentle mode- Throws:
java.io.IOException
-
Parser
public Parser(java.io.InputStream in, boolean gentle) throws java.io.IOExceptionCreates a parser for the specified input stream.- Parameters:
in- the input stream to read fromgentle- iftrue, parses in gentle mode- Throws:
java.io.IOException- if an I/O error occurs
-
-
Method Detail
-
next
public ClassMap.Entry next() throws java.io.IOException
Returns the next entry in the class map, ornullif the last entry has been reached.- Specified by:
nextin classResourceParser<ClassMap.Entry>- Returns:
- the next class map entry, or
null - Throws:
java.io.IOException- if an I/O error occurs
-
-