Version 1.5APIs subject to change!

multiverse.server.objects
Class Template

java.lang.Object
  extended by multiverse.server.objects.NamedPropertyClass
      extended by multiverse.server.objects.Template
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Template
extends NamedPropertyClass
implements java.lang.Cloneable

used to generate an entity

See Also:
Serialized Form

Field Summary
 
Fields inherited from class multiverse.server.objects.NamedPropertyClass
lock, name
 
Constructor Summary
Template()
           
Template(java.lang.String name)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.io.Serializable other)
          templates might not be stored in the database, so we check equality based on the template's name
 Entity generate()
           
 java.io.Serializable get(Namespace namespace, java.lang.String key)
           
 java.util.Set<Namespace> getNamespaces()
           
 java.util.Map<java.lang.String,java.io.Serializable> getSubMap(Namespace namespace)
          returns a copy of the submap, restricted to the namespace
 java.lang.String getType()
           
 int hashCode()
           
 Template merge(Template overrideTemplate)
          this "merges" the override template with the current template, and returns the result.
 void put(Namespace namespace, java.lang.String key, java.io.Serializable value)
          adds the key and value, within the passed in namespace.
 void put(java.lang.String namespaceString, java.lang.String key, java.io.Serializable value)
          the old overloading that uses the string name of the namespace.
 Template restrict(Namespace namespace)
          returns a template with only the passed in namespace parameters
 java.lang.String toString()
           
 
Methods inherited from class multiverse.server.objects.NamedPropertyClass
getBooleanProperty, getIntProperty, getName, getProperty, getPropertyMap, getPropertyMapRef, getStringProperty, lock, modifyIntProperty, setName, setProperty, setPropertyMap, setupTransient, unlock
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Template

public Template()

Template

public Template(java.lang.String name)
Method Detail

getType

public java.lang.String getType()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

put

public void put(Namespace namespace,
                java.lang.String key,
                java.io.Serializable value)
adds the key and value, within the passed in namespace. keys have to be unique within a given namespace.


put

public void put(java.lang.String namespaceString,
                java.lang.String key,
                java.io.Serializable value)
the old overloading that uses the string name of the namespace.


get

public java.io.Serializable get(Namespace namespace,
                                java.lang.String key)

getNamespaces

public java.util.Set<Namespace> getNamespaces()

getSubMap

public java.util.Map<java.lang.String,java.io.Serializable> getSubMap(Namespace namespace)
returns a copy of the submap, restricted to the namespace


restrict

public Template restrict(Namespace namespace)
returns a template with only the passed in namespace parameters


merge

public Template merge(Template overrideTemplate)
this "merges" the override template with the current template, and returns the result. this template is not modified.


equals

public boolean equals(java.io.Serializable other)
templates might not be stored in the database, so we check equality based on the template's name


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

generate

public Entity generate()


Copyright © 2008 The Multiverse Network, Inc.