Class MapArchObjectParser
- java.lang.Object
-
- net.sf.gridarta.model.io.AbstractMapArchObjectParser<MapArchObject>
-
- net.sf.gridarta.var.atrinik.model.io.MapArchObjectParser
-
- All Implemented Interfaces:
MapArchObjectParser<MapArchObject>
public class MapArchObjectParser extends AbstractMapArchObjectParser<MapArchObject>
AMapArchObjectParserfor Atrinik map arch object instances.
-
-
Constructor Summary
Constructors Constructor Description MapArchObjectParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidload(@NotNull java.io.BufferedReader reader, @NotNull MapArchObject mapArchObject)Parse a map arch object from a stream.protected booleanparseLine(@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.voidsave(@NotNull java.lang.Appendable appendable, @NotNull MapArchObject mapArchObject, @Nullable MapFile mapFile)Write a map arch object to a stream.
-
-
-
Method Detail
-
load
public void load(@NotNull @NotNull java.io.BufferedReader reader, @NotNull @NotNull MapArchObject mapArchObject) throws java.io.IOExceptionDescription copied from interface:MapArchObjectParserParse a map arch object from a stream.- Specified by:
loadin interfaceMapArchObjectParser<MapArchObject>- Overrides:
loadin classAbstractMapArchObjectParser<MapArchObject>- Parameters:
reader- the stream to readmapArchObject- 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.IOExceptionDescription copied from interface:MapArchObjectParserWrite a map arch object to a stream.- Parameters:
appendable- the stream to write tomapArchObject- the map arch object to writemapFile- the map file ornullif 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.IOExceptionDescription copied from class:AbstractMapArchObjectParserParse a line for this editor type.- Specified by:
parseLinein classAbstractMapArchObjectParser<MapArchObject>- Parameters:
line- the line to parsekey- the key fromlinevalue- the value fromline; the empty string if the line contains no valuemapArchObject- the map arch object to updatereader- 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
-
-