us.asciiroth.client.agents.npc
Class NPCSerializer<T extends NPC>

java.lang.Object
  extended by us.asciiroth.client.core.BaseSerializer<T>
      extended by us.asciiroth.client.agents.npc.NPCSerializer<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializer<T>

public abstract class NPCSerializer<T extends NPC>
extends BaseSerializer<T>
implements Serializer<T>

Somewhat simplifies the NPC serializers, which hold the most state of any piece in the game.


Constructor Summary
NPCSerializer()
           
 
Method Summary
 java.lang.String getTag()
          A category to file this piece under in the editor.
 java.lang.String store(T a)
          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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface us.asciiroth.client.core.Serializer
create, example
 

Constructor Detail

NPCSerializer

public NPCSerializer()
Method Detail

getTag

public java.lang.String getTag()
Description copied from interface: Serializer
A category to file this piece under in the editor.

Specified by:
getTag in interface Serializer<T extends NPC>
Returns:
string

store

public java.lang.String store(T a)
Description copied from interface: Serializer
Create a string representation of this piece, referred to in the code as a "key".

Specified by:
store in interface Serializer<T extends NPC>
Returns:
a string key for the supplied piece

template

public java.lang.String template(java.lang.String type)
Description copied from interface: Serializer
Provide a template string that can be used by the editor to guide the creation of a valid instance of this type.

Specified by:
template in interface Serializer<T extends NPC>
Returns:
a key-like template that can be used in the editor

0.7

2009 Alx Dark