com.jme.util.export
Class AbstractStringKeyMap<V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,V>
          extended by com.jme.util.export.AbstractStringKeyMap<V>
All Implemented Interfaces:
Savable, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,V>
Direct Known Subclasses:
StringBoolMap, StringFloatMap, StringIntMap, StringStringMap

public abstract class AbstractStringKeyMap<V>
extends java.util.HashMap<java.lang.String,V>
implements Savable

This class implements persistence for the String keys of a Savable map.

See Also:
Serialized Form

Field Summary
protected  java.lang.String[] unsavedKeys
           
 
Constructor Summary
AbstractStringKeyMap()
           
AbstractStringKeyMap(int initialCapacity)
           
AbstractStringKeyMap(int initialCapacity, float loadFactor)
           
AbstractStringKeyMap(java.util.Map<? extends java.lang.String,? extends V> m)
           
 
Method Summary
 java.lang.Class<? extends AbstractStringKeyMap> getClassTag()
          The peristed type for the object.
 void read(JMEImporter e)
          Subclasses must super.read(e), and can then use unsavedKeys to populate the map.
 void write(JMEExporter e)
          Subclasses must super.write(e)!
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, 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
equals, hashCode
 

Field Detail

unsavedKeys

protected java.lang.String[] unsavedKeys
Constructor Detail

AbstractStringKeyMap

public AbstractStringKeyMap()

AbstractStringKeyMap

public AbstractStringKeyMap(int initialCapacity)

AbstractStringKeyMap

public AbstractStringKeyMap(int initialCapacity,
                            float loadFactor)

AbstractStringKeyMap

public AbstractStringKeyMap(java.util.Map<? extends java.lang.String,? extends V> m)
Method Detail

write

public void write(JMEExporter e)
           throws java.io.IOException
Subclasses must super.write(e)!

Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JMEImporter e)
          throws java.io.IOException
Subclasses must super.read(e), and can then use unsavedKeys to populate the map.

Specified by:
read in interface Savable
Throws:
java.io.IOException

getClassTag

public java.lang.Class<? extends AbstractStringKeyMap> getClassTag()
Description copied from interface: Savable
The peristed type for the object. Note that tag here does not mean XML tag, but the class that the object is tagged with.

Specified by:
getClassTag in interface Savable


Copyright 2003-2009 jMonkeyEngine