com.partnersoft.core
Interface Immutable

All Known Subinterfaces:
CogType, LonlatShape<T>, RoverShape<T>, ShpPointShape, ShpShape, XyArea<T>, XyPath<T>, XyShape<T>, XyzShape<T>
All Known Implementing Classes:
AbstractCogType, AbstractRoverPointShape, AbstractRoverShape, AbstractXyTransform, AbstractXyzTransform, AllFilesFilter, ByteSize, CogCollectionType, CogEnumeratedType, CogPrimitiveType, CogStructureField, CogStructureType, CoordinateSystem, DataFilterExpression, DataFilterSort, DataRecordQuery, Date, DateAndTime, Dependency, DrawingSurfaceState, Duration, DxfGroup, Environment, FileExtensionFilter, FileExtensionListFilter, FilePatternFilter, GpsCorrection, GpsCorrectionFile, HollerChannel, ImmutableArrayList, J2seEnvironment, JUnitEnvironment, LinearUnitTransform, LonlatPoint, MapEditContext, ProjectionTransform, ReverseProjectionTransform, RoverArea, RoverBlock, RoverBlockCode, RoverBlockHeader, RoverByteParams, RoverConnectivityNode, RoverCoordinateSystem, RoverData, RoverDrawable, RoverEntity, RoverFindItem, RoverIcon, RoverImage, RoverLevelOfDetail, RoverLine, RoverPoint, RoverText, RoverType, Scale, SdePoint, SdePointM, SdePointZ, SdePointZM, SdeShape, ShapefileHeader, ShpCurve, ShpMultiPatch, ShpMultiPoint, ShpMultiPointM, ShpMultiPointZ, ShpNull, ShpPoint, ShpPointM, ShpPointZ, ShpPolyCurve, ShpPolygon, ShpPolygonM, ShpPolygonZ, ShpPolyLine, ShpPolyLineM, ShpPolyLineZ, ShpRecord, TiledRoverBuilderEvent, Time, Version, WebstartEnvironment, XyAffineTransform, XyAngle, XyArc, XyBounds, XyCircle, XyCubicCurve, XyDeflection, XyDirection, XyEllipse, XyGrid, XyGridCell, XyGridSystem, XyLine, XyLineSegment, XyPoint, XyPointOnPolyline, XyPolar, XyPolygon, XyPolyline, XyQuadraticCurve, XyQuadrilateral, XyRay, XyRectangle, XyRegularPolygon, XyRotation, XyShapeList, XySize, XyTriangle, XyVector, XyzAffineTransform, XyzBounds, XyzPerspectiveTransform, XyzPoint, XyzPolyline, YonderFileInfo

public interface Immutable

A marker interface for immutable classes.

An immutable object cannot be changed after it is created. A good example is java.lang.String.

Immutable objects have many nice properties - they are inherently thread safe, can be shared freely with other objects and methods without fear of destructive modification, etc. There is no need to copy the object.

Implementations should follow the rules in Effective Java. A skeleton is provided in the source tree, skeletons/SkeletonImmutable.java, for your copying pleasure.

Event and Exception objects are assumed to be Immutable; this is how they are treated in the Java API. As such you do not have to implement this interface for these types of classes.

Copyright 2006 Partner Software, Inc.

Version:
$Id: Immutable.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis, Russell Cagle