|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- public interface Serializer<T extends Piece>
For each piece type there is a serializer that can convert the piece back and forth to a key, and that also provides some metadata about the type so it can be manipulated in the map editor. Those latter methods are just not included in the compiled code of the game, so they introduce no overhead and are conveniently included as part of the serializer.
Method Summary | |
---|---|
T |
create(java.lang.String[] args)
Create a piece. |
T |
example()
Provide an example of this piece for display in the editor. |
java.lang.String |
getTag()
A category to file this piece under in the editor. |
java.lang.String |
store(T piece)
Create a string representation of this piece, referred to in the code as a "key". |
java.lang.String |
template(java.lang.String type)
Provide a template string that can be used by the editor to guide the creation of a valid instance of this type. |
Method Detail |
---|
T create(java.lang.String[] args)
args
- an array of strings, originally pipe-delimited, that can be used
to create a valid instance of this type.
T example()
java.lang.String getTag()
java.lang.String store(T piece)
piece
-
java.lang.String template(java.lang.String type)
type
-
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark