com.threerings.config
Class ArgumentMap

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.threerings.config.ArgumentMap
All Implemented Interfaces:
com.threerings.io.Streamable, Copyable, Map<String,Object>

public class ArgumentMap
extends AbstractMap<String,Object>
implements Copyable, com.threerings.io.Streamable

Stores arguments in a sorted entry list.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
com.threerings.io.Streamable.Closure
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ArgumentMap()
          Creates an empty map.
ArgumentMap(String firstKey, Object firstValue, Object... otherArgs)
          Creates an argument map with the supplied arguments.
 
Method Summary
 void clear()
           
 ArgumentMap clone()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Object copy(Object dest)
          Creates a copy of this object, (re)populating the supplied destination object if possible.
 Object copy(Object dest, Object outer)
          Creates a copy of this object, (re)populating the supplied destination object if possible.
 Set<Map.Entry<String,Object>> entrySet()
           
 boolean equals(Object other)
           
 Object get(Object key)
           
 int hashCode()
           
 Object put(String key, Object value)
           
 void readObject(com.threerings.io.ObjectInputStream in)
          Custom read method.
 Object remove(Object key)
           
 int size()
           
 void writeObject(com.threerings.io.ObjectOutputStream out)
          Custom write method.
 
Methods inherited from class java.util.AbstractMap
isEmpty, keySet, putAll, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArgumentMap

public ArgumentMap(String firstKey,
                   Object firstValue,
                   Object... otherArgs)
Creates an argument map with the supplied arguments.


ArgumentMap

public ArgumentMap()
Creates an empty map.

Method Detail

writeObject

public void writeObject(com.threerings.io.ObjectOutputStream out)
                 throws IOException
Custom write method.

Throws:
IOException

readObject

public void readObject(com.threerings.io.ObjectInputStream in)
                throws IOException,
                       ClassNotFoundException
Custom read method.

Throws:
IOException
ClassNotFoundException

copy

public Object copy(Object dest)
Description copied from interface: Copyable
Creates a copy of this object, (re)populating the supplied destination object if possible.

Specified by:
copy in interface Copyable
Returns:
either a reference to the destination object, if it could be repopulated, or a new object containing the copied state.

copy

public Object copy(Object dest,
                   Object outer)
Description copied from interface: Copyable
Creates a copy of this object, (re)populating the supplied destination object if possible.

Specified by:
copy in interface Copyable
outer - the outer object reference to use for inner object creation, if any.
Returns:
either a reference to the destination object, if it could be repopulated, or a new object containing the copied state.

size

public int size()
Specified by:
size in interface Map<String,Object>
Overrides:
size in class AbstractMap<String,Object>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<String,Object>
Overrides:
containsValue in class AbstractMap<String,Object>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<String,Object>
Overrides:
containsKey in class AbstractMap<String,Object>

get

public Object get(Object key)
Specified by:
get in interface Map<String,Object>
Overrides:
get in class AbstractMap<String,Object>

put

public Object put(String key,
                  Object value)
Specified by:
put in interface Map<String,Object>
Overrides:
put in class AbstractMap<String,Object>

remove

public Object remove(Object key)
Specified by:
remove in interface Map<String,Object>
Overrides:
remove in class AbstractMap<String,Object>

clear

public void clear()
Specified by:
clear in interface Map<String,Object>
Overrides:
clear in class AbstractMap<String,Object>

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Specified by:
entrySet in interface Map<String,Object>
Specified by:
entrySet in class AbstractMap<String,Object>

equals

public boolean equals(Object other)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class AbstractMap<String,Object>

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,Object>
Overrides:
hashCode in class AbstractMap<String,Object>

clone

public ArgumentMap clone()
Overrides:
clone in class AbstractMap<String,Object>


Copyright © 2011. All Rights Reserved.