org.duelengine.duel
Class SparseMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<String,Object>
              extended by org.duelengine.duel.SparseMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class SparseMap
extends LinkedHashMap<String,Object>

Represents sparsely populated graph of data to be serialized over the top of existing JavaScript Objects Does not get serialized directly.

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
SparseMap()
           
SparseMap(int initialCapacity)
           
 
Method Summary
static SparseMap asSparseMap(Object... pairs)
          Builds a mutable Map from an interlaced sequence of key-value pairs
 Object putSparse(String ident, Object value)
           
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

SparseMap

public SparseMap()

SparseMap

public SparseMap(int initialCapacity)
Method Detail

putSparse

public Object putSparse(String ident,
                        Object value)

asSparseMap

public static SparseMap asSparseMap(Object... pairs)
Builds a mutable Map from an interlaced sequence of key-value pairs

Parameters:
pairs -
Returns:


Copyright © 2012. All Rights Reserved.