public abstract class AbstractMapArchObjectParser<A extends MapArchObject<A>> extends java.lang.Object implements MapArchObjectParser<A>
MapArchObjectParsers
. This class contains the common code for reading map
game objects. Subclasses can extend the parser (parseLine(String,
MapArchObject, BufferedReader)
. No support for writing is present.Constructor and Description |
---|
AbstractMapArchObjectParser() |
Modifier and Type | Method and Description |
---|---|
void |
load(java.io.BufferedReader reader,
A mapArchObject)
Parse a map arch object from a stream.
|
protected abstract boolean |
parseLine(java.lang.String line,
A mapArchObject,
java.io.BufferedReader reader)
Parse a line for this editor type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save
public void load(@NotNull java.io.BufferedReader reader, @NotNull A mapArchObject) throws java.io.IOException
load
in interface MapArchObjectParser<A extends MapArchObject<A>>
reader
- the stream to readmapArchObject
- the map arch object to updatejava.io.IOException
- if the stream cannot be read or if a parsing error
occurs; the map arch object may have been partially updatedprotected abstract boolean parseLine(@NotNull java.lang.String line, @NotNull A mapArchObject, @NotNull java.io.BufferedReader reader) throws java.io.IOException
line
- the line to parsemapArchObject
- the map arch object to updatereader
- the reader for reading additional linesjava.io.IOException
- if an I/O error occurs