com.partnersoft.cog
Interface Coggable
- All Known Subinterfaces:
- CogType, DataFilterElement, MapDataMerge, ObjectNamer, SubsystemPreferences
- All Known Implementing Classes:
- AbstractCogType, AbstractMapDataMerge, AbstractSubsystemPreferences, AlbersEqualArea, BinaryFixedWidthDataRecordSource, CogCollectionType, CogEnumeratedType, CogPrimitiveType, CogStructureField, CogStructureType, ControlPreferences, CoordinateSystem, CoordinateTransformation, CsvDataRecordSource, CSVDataRecordSource, DatabaseConnectionConfig, DatabaseConnectionConfig, DataFilterExpression, DataFilterField, DataFilterSort, DataRecordQuery, DataRecordSource, DataRecordSource, DataRecordSourceMapDataMerge, DbfDataRecordSource, DBFDataRecordSource, Decoration, ExcelDataRecordSource, GeoToolsProjection, GpsCorrection, GPSReading, GPSSettings, GraphicsPreferences, GridContainer, ImageStyle, Java2dPreferences, LambertConformalConic, LayoutPreferences, Legend, LegendScaleRegion, LineDecoration, LineStyleSection, LineTextDataRecordSource, MapDataDerivation, MapDataIndex, MapDataItem, MapDataMergeField, MapDataTypeConfiguration, MapDataTypeField, MapsetPreferences, MapSpaceLegend, MapSpacePreferences, MapViewLegend, MapViewScaleRegion, MultiTransform, NamedBlob, Namer, NmeaParserSettings, NullProjection, OpenglPreferences, OrganizationBranding, PointStyle, PolygonStyle, PolylineStyle, ProductBranding, Projection, RandomAccessDataRecordSource, RangefinderSettings, RasterTiling, Rectangle, RoverCoordinateSystem, RoverData, ScriptedNamer, ShapefileDataRecordSource, Simple, SoundPreferences, SplittingNamer, SqlDatabase, SqlDataRecordSource, SQLDataRecordSource, StandardProjection, StreamingDataRecordSource, TextStyle, TransverseMercator, UpdatePreferences, UserSubsystemPreferences, UTM, ValidationError, ValidationErrorList, VideoPreferences, WheelMenuSkin, XyPoint
public interface Coggable
A Coggable is a Java object whose state can be saved to and restored from a Cog structure.
A skeletal implementation is provided in skeletons/java/SkeletonCoggable.java
for your convenience and pleasure.
Earlier versions were based on getState() and setState() methods; this made it
difficult to write Coggable implementations that were also Immutable. Now you must implement
toCog() and also provide a constructor that takes a single Cog argument.
This allows immutables to be instantiated correctly but not changed afterwards.
If you subclass another class that implements Coggable, be aware that you
must get/set the superclass's state as well. Use super(node) in your constructor and
state = super.toCog() before proceeding. A skeletal implementation of that
is provided in skeletons/java/SkeletonCoggableSubclass.java
Copyright 2005-2009 Partner Software, Inc.
- Version:
- $Id: Coggable.java 2044 2009-08-22 22:11:09Z paul $
- Author:
- Paul Reavis
|
Method Summary |
Cog |
toCog()
Returns the complete internal state of this object in the form of a
Cog. |
toCog
Cog toCog()
- Returns the complete internal state of this object in the form of a
Cog.
- Returns:
- Cog representing the internal state of this object