Package weka.core
Class SerializedObject
- java.lang.Object
-
- weka.core.SerializedObject
-
- All Implemented Interfaces:
Serializable,RevisionHandler
public class SerializedObject extends Object implements 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$
- Author:
- Richard Kirkby (rbk1@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SerializedObject(Object toStore)Creates a new serialized object (without compression).SerializedObject(Object toStore, boolean compress)Creates a new serialized object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object compareTo)ObjectgetObject()Returns a serialized object.StringgetRevision()Returns the revision string.inthashCode()Returns a hashcode for this object.
-
-
-
Method Detail
-
hashCode
public int hashCode()
Returns a hashcode for this object.
-
getObject
public Object getObject()
Returns a serialized object. Uses org.python.util.PythonObjectInputStream for Jython objects (read here for more details).- Returns:
- the restored object
-
getRevision
public String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
-