flex.messaging.io
Class ASObject

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by flex.messaging.io.ASObject
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>
Direct Known Subclasses:
ASRecordSet

public class ASObject
extends HashMap<String,Object>

Implementation of MM's flashgateway.io.ASObject so that we can use ASTranslator

Version:
$Revision: 1.11 $, $Date: 2004/02/06 02:48:59 $
Author:
Jason Calabrese , Sean C. Sullivan
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
ASObject()
           
ASObject(String type)
          Creates ASObject with type
 
Method Summary
 boolean containsKey(Object key)
          Returns true if this map contains a mapping for the specified key.
 Object get(Object key)
          Returns the value to which the specified key is mapped in this identity hash map, or null if the map contains no mapping for this key.
 String getType()
          Gets object type
 Object instantiate()
           
 Object put(String key, Object value)
          Associates the specified value with the specified key in this map.
 Object remove(Object key)
          Removes the mapping for this key from this map if present.
 void setType(String type)
          Sets object type
 String toString()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsValue, entrySet, isEmpty, keySet, putAll, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ASObject

public ASObject()

ASObject

public ASObject(String type)
Creates ASObject with type

Parameters:
type -
Method Detail

getType

public String getType()
Gets object type

Returns:
@see #setType(String)

setType

public void setType(String type)
Sets object type

Parameters:
type -
See Also:
getType()

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.

Specified by:
containsKey in interface Map<String,Object>
Overrides:
containsKey in class HashMap<String,Object>
Parameters:
key - The key whose presence in this map is to be tested
Returns:
true if this map contains a mapping for the specified key.

get

public Object get(Object key)
Returns the value to which the specified key is mapped in this identity hash map, or null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it is also possible that the map explicitly maps the key to null. The containsKey method may be used to distinguish these two cases.

Specified by:
get in interface Map<String,Object>
Overrides:
get in class HashMap<String,Object>
Parameters:
key - the key whose associated value is to be returned.
Returns:
the value to which this map maps the specified key, or null if the map contains no mapping for this key.
See Also:
HashMap.put(Object, Object)

put

public Object put(String key,
                  Object value)
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Specified by:
put in interface Map<String,Object>
Overrides:
put in class HashMap<String,Object>
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the HashMap previously associated null with the specified key.

remove

public Object remove(Object key)
Removes the mapping for this key from this map if present.

Specified by:
remove in interface Map<String,Object>
Overrides:
remove in class HashMap<String,Object>
Parameters:
key - key whose mapping is to be removed from the map.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.

instantiate

public Object instantiate()
Returns:
this method may return null
See Also:
setType(String), getType()

toString

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