de.fu_berlin.ties.io
Interface Storable

All Known Subinterfaces:
FeatureCountView, FMetricsView
All Known Implementing Classes:
BaseStorable, FeatureCount, FMetrics

public interface Storable

Classes implementing this interface support serialization in a human-readable format, by storing all relevant fields in a FieldMap.

Non-abstract implementations of this interface must support deserialization by providing a public constructor that accepts a FieldMap as single parameter that reads all relevant field values from the map. There is no way to enforce this convention (as interfaces cannot contain constructors), but deserialization via FieldMap.createObject(Class) will fail when it is violated. Deserialization is based on a constructor instead of a "restore" or "init" method to allow the deserialization of immutable objects (whose fields cannot be changed after construction).

Version:
$Revision: 1.1 $, $Date: 2004/02/02 18:49:56 $, $Author: siefkes $
Author:
Christian Siefkes

Method Summary
 FieldMap storeFields()
          Stores all relevant fields of this object in a field map for serialization.
 

Method Detail

storeFields

public FieldMap storeFields()
Stores all relevant fields of this object in a field map for serialization. An equivalent object can be created by calling FieldMap.createObject(Class) on the created field map.

Returns:
the created field map


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.