Package com.luciad.format.shp
Class TLcdSHPLazyFeatured
java.lang.Object
com.luciad.format.shp.TLcdSHPLazyFeatured
- All Implemented Interfaces:
ILcdFeatured
,Serializable
Class that allows to read the features of an
Object
, read from
a SHP file, only when it is needed. If the features have been read they are
cached within memory.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canSetFeature
(int aIndex) Checks whether the specified feature is editable.int
Returns the feature index to use for the display name.Returns the display name of thisILcdFeatured
object.final Object
getFeature
(int aIndex) Returns the featureObject
at the given index.final int
Returns the number of features.void
setDefaultDisplayNameIndex
(int aDefaultDisplayNameIndex) Sets the feature index to use for the display name.void
setFeature
(int aIndex, Object aFeature) Sets the featureObject
at the given index.toString()
-
Method Details
-
getFeatureCount
public final int getFeatureCount()Description copied from interface:ILcdFeatured
Returns the number of features.- Specified by:
getFeatureCount
in interfaceILcdFeatured
- Returns:
- the number of features.
-
getFeature
Description copied from interface:ILcdFeatured
Returns the featureObject
at the given index.- Specified by:
getFeature
in interfaceILcdFeatured
- Parameters:
aIndex
- a valid feature index.- Returns:
- the feature
Object
at the given index. - Throws:
IndexOutOfBoundsException
- when an index is chosen greater than the result of getFeatureCount.- See Also:
-
setFeature
Description copied from interface:ILcdFeatured
Sets the featureObject
at the given index.- Specified by:
setFeature
in interfaceILcdFeatured
- Parameters:
aIndex
- a valid feature index.aFeature
- the new featureObject
.- See Also:
-
canSetFeature
public boolean canSetFeature(int aIndex) Description copied from interface:ILcdFeatured
Checks whether the specified feature is editable.- Specified by:
canSetFeature
in interfaceILcdFeatured
- Parameters:
aIndex
- a valid feature index.- Returns:
- true if the feature can be set, false otherwise.
-
getDisplayName
Returns the display name of thisILcdFeatured
object.- Returns:
- the display name of this
ILcdFeatured
object.
-
setDefaultDisplayNameIndex
public void setDefaultDisplayNameIndex(int aDefaultDisplayNameIndex) Sets the feature index to use for the display name.- Parameters:
aDefaultDisplayNameIndex
- the feature index to use for the display name.- See Also:
-
getDefaultDisplayNameIndex
public int getDefaultDisplayNameIndex()Returns the feature index to use for the display name.- Returns:
- the feature index to use for the display name.
- See Also:
-
toString
-