com.google.gson.internal
Class StringMap<V>

java.lang.Object
  extended by java.util.AbstractMap<String,V>
      extended by com.google.gson.internal.StringMap<V>
All Implemented Interfaces:
Map<String,V>

public final class StringMap<V>
extends AbstractMap<String,V>

A map of strings to values. Like LinkedHashMap, this map's iteration order is well defined: it is the order that elements were inserted into the map. This map does not support null keys.

This implementation was derived from Android 4.0's LinkedHashMap.


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 java.util.Map
Map.Entry<K,V>
 
Constructor Summary
StringMap()
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 Set<Map.Entry<String,V>> entrySet()
           
 V get(Object key)
           
 Set<String> keySet()
           
 V put(String key, V value)
           
 V remove(Object key)
           
 int size()
           
 Collection<V> values()
           
 
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringMap

public StringMap()
Method Detail

size

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

containsKey

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

get

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

put

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

remove

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

clear

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

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,V>
Overrides:
keySet in class AbstractMap<String,V>

values

public Collection<V> values()
Specified by:
values in interface Map<String,V>
Overrides:
values in class AbstractMap<String,V>

entrySet

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


Copyright © 2012. All Rights Reserved.