Package com.luciad.ais.model
Class TLcdHashedFeaturedDescriptor
java.lang.Object
com.luciad.ais.model.TLcdHashedFeaturedDescriptor
- All Implemented Interfaces:
ILcdFeaturedDescriptor
This implementation of
ILcdFeaturedDescriptor
uses a hashtable to
map feature names to feature indices. This provides an efficient
getFeatureIndex
operation.-
Constructor Summary
ConstructorDescriptionTLcdHashedFeaturedDescriptor
(TLcdDataType aDataType) Constructs a new hashed featured descriptor that describes features of the given data type.TLcdHashedFeaturedDescriptor
(ILcdFeaturedDescriptor aFeaturedDescriptor) Constructs aTLcdHashedFeaturedDescriptor
given another featured descriptor.TLcdHashedFeaturedDescriptor
(String[] aFeatureNames, Class[] aFeatureClasses) Constructs a newTLcdHashFeaturedDescriptor
object. -
Method Summary
Modifier and TypeMethodDescriptiongetFeatureClass
(int aIndex) Returns theClass
of the feature at the given index.int
Returns the number of features.int
getFeatureIndex
(String aName) Returns the index of the given feature name if it exists, -1 otherwise.getFeatureName
(int aIndex) Returns the name of the feature at the given index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdFeaturedDescriptor
getFeatureUnitOfMeasure
-
Constructor Details
-
TLcdHashedFeaturedDescriptor
Constructs a new hashed featured descriptor that describes features of the given data type. The properties of the given type will be used to determine feature names and classes. Note that instances of this class don't keep track of the given data type. This constructor just extracts the information it needs from it. This constructor is intended to be used only in the context of AIS. It's not a general mechanism to create a featured descriptor from a data type.- Parameters:
aDataType
- The data type of the features that will be described by this descriptor.- Since:
- 10.1
-
TLcdHashedFeaturedDescriptor
Constructs a newTLcdHashFeaturedDescriptor
object. A reference is kept to bothaFeatureNames
andaFeatureClasses
; they are not copied.- Parameters:
aFeatureNames
- the features namesaFeatureClasses
- the feature classes
-
TLcdHashedFeaturedDescriptor
Constructs aTLcdHashedFeaturedDescriptor
given another featured descriptor.- Parameters:
aFeaturedDescriptor
-
-
-
Method Details
-
getFeatureCount
public int getFeatureCount()Description copied from interface:ILcdFeaturedDescriptor
Returns the number of features.- Specified by:
getFeatureCount
in interfaceILcdFeaturedDescriptor
- Returns:
- the number of features.
-
getFeatureName
Description copied from interface:ILcdFeaturedDescriptor
Returns the name of the feature at the given index.- Specified by:
getFeatureName
in interfaceILcdFeaturedDescriptor
- Parameters:
aIndex
- a valid feature index.- Returns:
- the name of the feature at the given index.
-
getFeatureIndex
Description copied from interface:ILcdFeaturedDescriptor
Returns the index of the given feature name if it exists, -1 otherwise.- Specified by:
getFeatureIndex
in interfaceILcdFeaturedDescriptor
- Parameters:
aName
- a feature name.- Returns:
- the index of the given feature name if it exists, -1 otherwise.
-
getFeatureClass
Description copied from interface:ILcdFeaturedDescriptor
Returns theClass
of the feature at the given index.- Specified by:
getFeatureClass
in interfaceILcdFeaturedDescriptor
- Parameters:
aIndex
- a valid feature index.- Returns:
- the
Class
of the feature at the given index.
-