com.github.libxjava.util
Class SerialisableHashMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by com.github.libxjava.util.BasicHashMap
              extended by com.github.libxjava.util.SerialisableHashMap
All Implemented Interfaces:
ISerialisable, Serializable, Cloneable, Map

public class SerialisableHashMap
extends BasicHashMap
implements ISerialisable

Version:
libxjava-cdc - 0.2
Author:
Marcel Patzlaff
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
SerialisableHashMap()
           
SerialisableHashMap(int initialCapacity)
           
 
Method Summary
 void deserialise(IDeserialiser in)
          Defines the protocol to deserialise data and fill the fields of the implementing class.
 void serialise(ISerialiser out)
          This method defines the serialisation protocol of the implementing class.
 
Methods inherited from class com.github.libxjava.util.BasicHashMap
clear, containsKey, containsValue, elements, get, isEmpty, keys, put, remove, size, toString
 
Methods inherited from class java.util.HashMap
clone, entrySet, keySet, putAll, 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

SerialisableHashMap

public SerialisableHashMap()

SerialisableHashMap

public SerialisableHashMap(int initialCapacity)
Method Detail

deserialise

public void deserialise(IDeserialiser in)
                 throws IOException,
                        ClassNotFoundException
Description copied from interface: ISerialisable
Defines the protocol to deserialise data and fill the fields of the implementing class.

Ensure that the protocols defined here and in ISerialisable.serialise(ISerialiser) are compatible!

Specified by:
deserialise in interface ISerialisable
Parameters:
in - the deserialiser to read the content from
Throws:
IOException - if problems occur during the deserialisation process
ClassNotFoundException - if class cannot be loaded and instantiated
See Also:
IDeserialiser.readObject()

serialise

public void serialise(ISerialiser out)
               throws IOException
Description copied from interface: ISerialisable
This method defines the serialisation protocol of the implementing class.

Specified by:
serialise in interface ISerialisable
Parameters:
out - the serialiser to write the content to
Throws:
IOException - if problems occur during the serialisation process
See Also:
ISerialiser.writeObject(Object)


Copyright © 2010 Marcel Patzlaff. All Rights Reserved.