Package weka.core
Class SerializedObject
java.lang.Object
weka.core.SerializedObject
- All Implemented Interfaces:
Serializable
,RevisionHandler
Class for storing an object in serialized form in memory. It can be used to
make deep copies of objects, and also allows compression to conserve memory.
- Version:
- $Revision: 14684 $
- Author:
- Richard Kirkby (rbk1@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
ConstructorDescriptionSerializedObject
(Object toStore) Creates a new serialized object (without compression).SerializedObject
(Object toStore, boolean compress) Creates a new serialized object. -
Method Summary
-
Constructor Details
-
SerializedObject
Creates a new serialized object (without compression).- Parameters:
toStore
- the object to store- Throws:
Exception
- if the object couldn't be serialized
-
SerializedObject
Creates a new serialized object.- Parameters:
toStore
- the object to storecompress
- whether or not to use compression- Throws:
Exception
- if the object couldn't be serialized
-
-
Method Details
-
equals
-
hashCode
public int hashCode()Returns a hashcode for this object. -
getObject
Returns a serialized object. Uses org.python.util.PythonObjectInputStream for Jython objects (read here for more details).- Returns:
- the restored object
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-