nz.ac.waikato.mcennis.rat.graph.property
Class IntegerFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.property.IntegerFactory
All Implemented Interfaces:
PropertyValueFactory<java.lang.Integer>

public class IntegerFactory
extends java.lang.Object
implements PropertyValueFactory<java.lang.Integer>

Factory for serializing and deserializing Integer objects


Constructor Summary
IntegerFactory()
           
 
Method Summary
 java.lang.String exportToString(java.lang.Integer type, Graph g)
          Create a string representing the contents of this object.
 java.lang.Integer 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
 

Constructor Detail

IntegerFactory

public IntegerFactory()
Method Detail

importFromString

public java.lang.Integer 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.lang.Integer>
Parameters:
data - string containing the data used to create the object
g - graph context of the string
Returns:
newly constructed object

exportToString

public java.lang.String exportToString(java.lang.Integer type,
                                       Graph g)
Description copied from interface: PropertyValueFactory
Create a string representing the contents of this object.

Specified by:
exportToString in interface PropertyValueFactory<java.lang.Integer>
Parameters:
type - object to be serialized
g - graph context of the object
Returns:
string representing the content of the object