nz.ac.waikato.mcennis.rat.graph.property
Class HashMapStringDoubleFactory
java.lang.Object
nz.ac.waikato.mcennis.rat.graph.property.HashMapStringDoubleFactory
- All Implemented Interfaces:
- PropertyValueFactory<java.util.HashMap<java.lang.String,java.lang.Double>>
public class HashMapStringDoubleFactory
- extends java.lang.Object
- implements PropertyValueFactory<java.util.HashMap<java.lang.String,java.lang.Double>>
Factory for serlizing and deserializing HashMap<String,Double> objects
Method Summary |
java.lang.String |
exportToString(java.util.HashMap<java.lang.String,java.lang.Double> type,
Graph g)
Create a string representing the contents of this object. |
java.util.HashMap<java.lang.String,java.lang.Double> |
importFromString(java.lang.String data,
Graph g)
Create an instance of this type from a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HashMapStringDoubleFactory
public HashMapStringDoubleFactory()
importFromString
public java.util.HashMap<java.lang.String,java.lang.Double> importFromString(java.lang.String data,
Graph g)
- Description copied from interface:
PropertyValueFactory
- Create an instance of this type from a string.
- Specified by:
importFromString
in interface PropertyValueFactory<java.util.HashMap<java.lang.String,java.lang.Double>>
- Parameters:
data
- string containing the data used to create the objectg
- graph context of the string
- Returns:
- newly constructed object
exportToString
public java.lang.String exportToString(java.util.HashMap<java.lang.String,java.lang.Double> type,
Graph g)
- Description copied from interface:
PropertyValueFactory
- Create a string representing the contents of this object.
- Specified by:
exportToString
in interface PropertyValueFactory<java.util.HashMap<java.lang.String,java.lang.Double>>
- Parameters:
type
- object to be serializedg
- graph context of the object
- Returns:
- string representing the content of the object