Class MapArchObjectParser

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void load​(@NotNull java.io.BufferedReader reader, @NotNull MapArchObject mapArchObject)
      Parse a map arch object from a stream.
      protected boolean parseLine​(@NotNull java.lang.String line, @NotNull java.lang.String key, @NotNull java.lang.String value, @NotNull MapArchObject mapArchObject, @NotNull java.io.BufferedReader reader)
      Parse a line for this editor type.
      void save​(@NotNull java.lang.Appendable appendable, @NotNull MapArchObject mapArchObject, @Nullable MapFile mapFile)
      Write a map arch object to a stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapArchObjectParser

        public MapArchObjectParser()
    • Method Detail

      • load

        public void load​(@NotNull
                         @NotNull java.io.BufferedReader reader,
                         @NotNull
                         @NotNull MapArchObject mapArchObject)
                  throws java.io.IOException
        Description copied from interface: MapArchObjectParser
        Parse a map arch object from a stream.
        Specified by:
        load in interface MapArchObjectParser<MapArchObject>
        Overrides:
        load in class AbstractMapArchObjectParser<MapArchObject>
        Parameters:
        reader - the stream to read
        mapArchObject - the map arch object to update
        Throws:
        java.io.IOException - if the stream cannot be read or if a parsing error occurs; the map arch object may have been partially updated
      • save

        public void save​(@NotNull
                         @NotNull java.lang.Appendable appendable,
                         @NotNull
                         @NotNull MapArchObject mapArchObject,
                         @Nullable
                         @Nullable MapFile mapFile)
                  throws java.io.IOException
        Description copied from interface: MapArchObjectParser
        Write a map arch object to a stream.
        Parameters:
        appendable - the stream to write to
        mapArchObject - the map arch object to write
        mapFile - the map file or null if unknown
        Throws:
        java.io.IOException - if the stream cannot be written
      • parseLine

        protected boolean parseLine​(@NotNull
                                    @NotNull java.lang.String line,
                                    @NotNull
                                    @NotNull java.lang.String key,
                                    @NotNull
                                    @NotNull java.lang.String value,
                                    @NotNull
                                    @NotNull MapArchObject mapArchObject,
                                    @NotNull
                                    @NotNull java.io.BufferedReader reader)
                             throws java.io.IOException
        Description copied from class: AbstractMapArchObjectParser
        Parse a line for this editor type.
        Specified by:
        parseLine in class AbstractMapArchObjectParser<MapArchObject>
        Parameters:
        line - the line to parse
        key - the key from line
        value - the value from line; the empty string if the line contains no value
        mapArchObject - the map arch object to update
        reader - the reader for reading additional lines
        Returns:
        true=the line has been consumed; false=parsing is done
        Throws:
        java.io.IOException - if an I/O error occurs or if the line cannot be parsed