All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.core.SerializedObject

java.lang.Object
    |
    +----weka.core.SerializedObject

public class SerializedObject
extends java.lang.Object
implements java.io.Serializable
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: 1.7 $
Author:
Richard Kirkby (rbk1@cs.waikato.ac.nz)

Constructor Index

 o SerializedObject(Object)
Creates a new serialized object (without compression).
 o SerializedObject(Object, boolean)
Creates a new serialized object.

Method Index

 o equals(Object)
 
 o getObject()
Returns a serialized object.
 o hashCode()
Returns a hashcode for this object.

Constructor Detail

 o SerializedObject
public SerializedObject(java.lang.Object toStore) throws java.lang.Exception
          Creates a new serialized object (without compression).
Parameters:
toStore - the object to store
compress - whether or not to use compression
Throws:
java.lang.Exception - if the object couldn't be serialized
 o SerializedObject
public SerializedObject(java.lang.Object toStore,
                        boolean compress) throws java.lang.Exception
          Creates a new serialized object.
Parameters:
toStore - the object to store
compress - whether or not to use compression
Throws:
java.lang.Exception - if the object couldn't be serialized

Method Detail

 o equals
public final boolean equals(java.lang.Object compareTo)
Overrides:
equals in class java.lang.Object
 o hashCode
public int hashCode()
          Returns a hashcode for this object.
Returns:
the hashcode
Overrides:
hashCode in class java.lang.Object
 o getObject
public java.lang.Object getObject()
          Returns a serialized object.
Returns:
the restored object
Throws:
java.lang.Exception - if the object couldn't be restored

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home