public interface GameObjectParser<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
GameObject instances.| Modifier and Type | Method and Description |
|---|---|
void |
addModifiedFields(G gameObject,
@NotNull java.util.Map<java.lang.String,java.lang.String> fields)
Adds the modified fields of a
GameObject to a map. |
void |
collectTempList(@NotNull java.util.List<G> objects)
Browse first through the archetype list and attach map arches to it then
browse through the face list and try to find the pictures.
|
@NotNull java.util.Map<java.lang.String,java.lang.String> |
getModifiedFields(G gameObject)
Returns the modified fields of a
GameObject. |
G |
load(@NotNull java.io.BufferedReader reader,
@Nullable java.util.Collection<G> objects)
Parse a game object from a stream.
|
G |
load(@NotNull java.io.BufferedReader reader,
@NotNull java.lang.String firstLine,
@Nullable java.util.Collection<G> objects)
Parse a game object from a stream.
|
void |
save(@NotNull java.lang.Appendable appendable,
G gameObject)
Write a game object object to a stream.
|
@Nullable G load(@NotNull @NotNull java.io.BufferedReader reader, @Nullable @Nullable java.util.Collection<G> objects) throws java.io.IOException
reader - the stream to readobjects - if non-null, add the read game objects to this
collectionnull if the end of the stream
was reachedjava.io.IOException - if the stream cannot be read or if a parsing error
occurs@Nullable G load(@NotNull @NotNull java.io.BufferedReader reader, @NotNull @NotNull java.lang.String firstLine, @Nullable @Nullable java.util.Collection<G> objects) throws java.io.IOException
reader - the stream to readfirstLine - the first line to parse before reading from readerobjects - if non-null, add the read game objects to this
collectionnull if the end of the stream
was reachedjava.io.IOException - if the stream cannot be read or if a parsing error
occursvoid save(@NotNull
@NotNull java.lang.Appendable appendable,
@NotNull
G gameObject)
throws java.io.IOException
appendable - the stream to write togameObject - the game object to writejava.io.IOException - if the stream cannot be writtenvoid collectTempList(@NotNull
@NotNull java.util.List<G> objects)
objects - the list of game objects to collect@NotNull
@NotNull java.util.Map<java.lang.String,java.lang.String> getModifiedFields(@NotNull
G gameObject)
GameObject. These fields are
written into map files.gameObject - the game objectvoid addModifiedFields(@NotNull
G gameObject,
@NotNull
@NotNull java.util.Map<java.lang.String,java.lang.String> fields)
GameObject to a map.gameObject - the game objectfields - the map to update