|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.data.RpcMap
public class RpcMap
RpcMap is used to workaround a part of GWT RPC system.
The GWT RPC rebinder generates field serializers for every type that is assignable to any type in the RPC interfaces.
If BaseModel was to use "Map<String, Serializable> map" this would trigger the RPC system to generate field serializers for EVERY Serializable type in your GWT Module's class path. Therefore BaseModel uses "Map<String, RpcField> map" and relies on type erasure (cast to Map<Object,Object>) to work around this. The only drawback is that if you have to ensure that field serializers are generated for any type you add to this map. RpcMap ensures that the following types are supported Byte, Short, Integer, Long, Float, Double, Date, Boolean, and arrays of these types. As well as List, Set and Map
Constructor Summary | |
---|---|
RpcMap()
|
Method Summary | |
---|---|
void |
clear()
Removes all the mappings from this map. |
boolean |
containsKey(java.lang.String key)
Returns true if this map contains a mapping for this key. |
boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more keys to the specified value. |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet()
Returns a Set view of the mappings contained in this map. |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
get(java.lang.String key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. |
java.util.Map<java.lang.String,java.lang.Object> |
getTransientMap()
Returns the internal map. |
int |
hashCode()
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
java.util.Set<java.lang.String> |
keySet()
Returns a Set view of the keys contained in this map. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Associates the specified value with the specified key in this map (optional operation). |
void |
putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)
Copies all of the mappings from the specified map to this map (optional operation). |
java.lang.Object |
remove(java.lang.Object key)
Removes the mapping for a key from this map if it is present (optional operation). |
int |
size()
Returns the number of key-value mappings in this map. |
java.lang.String |
toString()
|
java.util.Collection<java.lang.Object> |
values()
Returns a Collection view of the values contained in this map. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RpcMap()
Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.Object> getTransientMap()
public void clear()
public boolean containsKey(java.lang.String key)
key
- the key
public boolean containsValue(java.lang.Object value)
value
- the value
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.Object get(java.lang.String key)
key
- the key
public int hashCode()
hashCode
in class java.lang.Object
public boolean isEmpty()
public java.util.Set<java.lang.String> keySet()
public java.lang.Object put(java.lang.String key, java.lang.Object value)
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified key
public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)
m
- mappings to be stored in this mappublic java.lang.Object remove(java.lang.Object key)
key
- key whose mapping is to be removed from the map
public int size()
public java.util.Collection<java.lang.Object> values()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |