Package gamedata

Class 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.
    • Constructor Detail

      • Parser

        public Parser​(java.lang.String resource,
                      boolean gentle)
               throws java.io.IOException
        Creates a parser for the specified resource file.
        Parameters:
        resource - the location of the desired tile set resource
        gentle - if true, parses in gentle mode
        Throws:
        java.io.IOException
      • Parser

        public Parser​(java.io.InputStream in,
                      boolean gentle)
               throws java.io.IOException
        Creates a parser for the specified input stream.
        Parameters:
        in - the input stream to read from
        gentle - if true, 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, or null if the last entry has been reached.
        Specified by:
        next in class ResourceParser<ClassMap.Entry>
        Returns:
        the next class map entry, or null
        Throws:
        java.io.IOException - if an I/O error occurs