com.threerings.config.dist.data
Class ConfigKey

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.config.dist.data.ConfigKey
All Implemented Interfaces:
Streamable, DSet.Entry, Comparable<ConfigKey>

public class ConfigKey
extends SimpleStreamableObject
implements Comparable<ConfigKey>, DSet.Entry

Identifies a configuration.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
protected  Class<? extends ManagedConfig> _cclass
          The config class.
protected  String _name
          The config name.
 
Constructor Summary
ConfigKey()
          No-arg constructor for deserialization.
ConfigKey(Class<? extends ManagedConfig> cclass, String name)
          Constructor for new keys.
 
Method Summary
 int compareTo(ConfigKey other)
           
 boolean equals(Object other)
           
 Class<? extends ManagedConfig> getConfigClass()
          Returns the config class.
 Comparable<?> getKey()
           
 String getName()
          Returns the name of the config.
 void readObject(ObjectInputStream in)
          Custom read method for streaming.
 String toString()
           
 void writeObject(ObjectOutputStream out)
          Custom write method for streaming.
 
Methods inherited from class com.threerings.io.SimpleStreamableObject
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_cclass

protected transient Class<? extends ManagedConfig> _cclass
The config class.


_name

protected String _name
The config name.

Constructor Detail

ConfigKey

public ConfigKey(Class<? extends ManagedConfig> cclass,
                 String name)
Constructor for new keys.


ConfigKey

public ConfigKey()
No-arg constructor for deserialization.

Method Detail

getConfigClass

public Class<? extends ManagedConfig> getConfigClass()
Returns the config class.


getName

public String getName()
Returns the name of the config.


writeObject

public void writeObject(ObjectOutputStream out)
                 throws IOException
Custom write method for streaming.

Throws:
IOException

readObject

public void readObject(ObjectInputStream in)
                throws IOException,
                       ClassNotFoundException
Custom read method for streaming.

Throws:
IOException
ClassNotFoundException

compareTo

public int compareTo(ConfigKey other)
Specified by:
compareTo in interface Comparable<ConfigKey>

getKey

public Comparable<?> getKey()
Specified by:
getKey in interface DSet.Entry

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class SimpleStreamableObject