Class AbstractMapArchObjectParser<A extends MapArchObject<A>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void load​(@NotNull java.io.BufferedReader reader, A mapArchObject)
      Parse a map arch object from a stream.
      protected abstract boolean parseLine​(@NotNull java.lang.String line, @NotNull java.lang.String key, @NotNull java.lang.String value, A mapArchObject, @NotNull java.io.BufferedReader reader)
      Parse a line for this editor type.
      • Methods inherited from class java.lang.Object

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

      • AbstractMapArchObjectParser

        public AbstractMapArchObjectParser()
    • Method Detail

      • load

        public void load​(@NotNull
                         @NotNull java.io.BufferedReader reader,
                         @NotNull
                         A mapArchObject)
                  throws java.io.IOException
        Description copied from interface: MapArchObjectParser
        Parse a map arch object from a stream.
        Specified by:
        load in interface MapArchObjectParser<A extends MapArchObject<A>>
        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
      • parseLine

        protected abstract boolean parseLine​(@NotNull
                                             @NotNull java.lang.String line,
                                             @NotNull
                                             @NotNull java.lang.String key,
                                             @NotNull
                                             @NotNull java.lang.String value,
                                             @NotNull
                                             A mapArchObject,
                                             @NotNull
                                             @NotNull java.io.BufferedReader reader)
                                      throws java.io.IOException
        Parse a line for this editor type.
        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