Package com.luciad.shape.shape2D
Class TLcdXYFloatPolypointCache
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.shape2D.ALcd2DEditableShape
com.luciad.shape.shape2D.ALcd2DEditableFloatPolypoint
com.luciad.shape.shape2D.TLcdXYFloatPolypoint
com.luciad.shape.shape2D.TLcdXYFloatPolypointCache
- All Implemented Interfaces:
ILcdBounded
,ILcdPointList
,ILcdPolypoint
,ILcdShape
,ILcd2DEditablePointList
,ILcd2DEditablePolypoint
,ILcd2DEditableShape
,ILcdCache
,ILcdCloneable
,Serializable
,Cloneable
This class provides an implementation of
ILcd2DEditablePolypoint
in
the geodetic space.
Calculations are based on a spherical approximation.
It uses an array of floats instead of a TLcd2DEditablePointList
of ILcd2DEditablePoint
objects. A single array of floats
stores the 2D coordinates. The points are stored as (x,y) pairs.
The boolean indicates whether the last 4 places in the array can be used
to store the bounds of the ILcd2DEditablePolypoint
.
This class is thread-hostile, even for read-only access, since point instances are being reused from an internal pool.
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdXYFloatPolypointCache
(float[] aPoints, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone) TLcdXYFloatPolypointCache
(TLcdXYFloatPolypointCache aXYFloatPolypointCache) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the cache.clone()
Creates and returns a copy of this object, by delegating toObject.clone()
.getCachedObject
(Object aKey) Looks up and returns the cached Object corresponding to the given key.void
insertIntoCache
(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.protected void
removeCachedObject
(Object aKey) Looks up and removes the cached Object corresponding to the given key.Methods inherited from class com.luciad.shape.shape2D.TLcdXYFloatPolypoint
createBounds, createPoint
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableFloatPolypoint
calculateBounds, calculateFocusPoint, contains2D, equals, getBounds, getFocusPoint, getPoint, getPointCount, hashCode, insert2DPoint, move2D, move2DPoint, removePointAt, translate2D, translate2DPoint
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
contains3D, move2D
Methods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D, fromDomainObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditablePointList
append2DPoint, insert2DPoint, move2DPoint, removePointAt, translate2D, translate2DPoint
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D, move2D, translate2D
Methods inherited from interface com.luciad.shape.ILcdBounded
getBounds
Methods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZ
Methods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPoint
-
Constructor Details
-
TLcdXYFloatPolypointCache
public TLcdXYFloatPolypointCache() -
TLcdXYFloatPolypointCache
public TLcdXYFloatPolypointCache(float[] aPoints, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone) -
TLcdXYFloatPolypointCache
-
-
Method Details
-
invalidate
protected void invalidate()- Overrides:
invalidate
in classALcd2DEditableFloatPolypoint
-
insertIntoCache
Description copied from interface:ILcdCache
Inserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCache
in interfaceILcdCache
- Parameters:
aKey
- the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself:insertIntoCache(this, ...)
.aObject
- the Object to be cached.
-
getCachedObject
Description copied from interface:ILcdCache
Looks up and returns the cached Object corresponding to the given key.- Specified by:
getCachedObject
in interfaceILcdCache
- Parameters:
aKey
- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there is no Object corresponding to the given key.
-
removeCachedObject
Description copied from interface:ILcdCache
Looks up and removes the cached Object corresponding to the given key.- Specified by:
removeCachedObject
in interfaceILcdCache
- Parameters:
aKey
- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there was no Object corresponding to the given key.
-
clearCache
public void clearCache()Description copied from interface:ILcdCache
Clears the cache.- Specified by:
clearCache
in interfaceILcdCache
-
clone
Description copied from class:ALcdShape
Creates and returns a copy of this object, by delegating toObject.clone()
. Extensions should delegate to this implementation withsuper.clone()
, in order to create an object instance of the right type, with all fields copied. They then should explicitly clone any non-primitive fields for which a deeper clone is required.- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classALcd2DEditableFloatPolypoint
- See Also:
-