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,
String, String, MapArchObject, BufferedReader). No support for writing is
present.| Constructor and Description |
|---|
AbstractMapArchObjectParser() |
| Modifier and Type | Method and 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsavepublic void load(@NotNull
@NotNull java.io.BufferedReader reader,
@NotNull
A mapArchObject)
throws java.io.IOException
MapArchObjectParserload 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
@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
line - the line to parsekey - the key from linevalue - the value from line; the empty string if the line
contains no valuemapArchObject - the map arch object to updatereader - the reader for reading additional linesjava.io.IOException - if an I/O error occurs or if the line cannot be
parsed