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
ConstructorsConstructorDescriptionTLcdHashedFeaturedDescriptor(TLcdDataType aDataType) Constructs a new hashed featured descriptor that describes features of the given data type.TLcdHashedFeaturedDescriptor(ILcdFeaturedDescriptor aFeaturedDescriptor) Constructs aTLcdHashedFeaturedDescriptorgiven another featured descriptor.TLcdHashedFeaturedDescriptor(String[] aFeatureNames, Class[] aFeatureClasses) Constructs a newTLcdHashFeaturedDescriptorobject. -
Method Summary
Modifier and TypeMethodDescriptiongetFeatureClass(int aIndex) Returns theClassof the feature at the given index.intReturns the number of features.intgetFeatureIndex(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, waitMethods 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 newTLcdHashFeaturedDescriptorobject. A reference is kept to bothaFeatureNamesandaFeatureClasses; they are not copied.- Parameters:
aFeatureNames- the features namesaFeatureClasses- the feature classes
-
TLcdHashedFeaturedDescriptor
Constructs aTLcdHashedFeaturedDescriptorgiven another featured descriptor.- Parameters:
aFeaturedDescriptor-
-
-
Method Details
-
getFeatureCount
public int getFeatureCount()Description copied from interface:ILcdFeaturedDescriptorReturns the number of features.- Specified by:
getFeatureCountin interfaceILcdFeaturedDescriptor- Returns:
- the number of features.
-
getFeatureName
Description copied from interface:ILcdFeaturedDescriptorReturns the name of the feature at the given index.- Specified by:
getFeatureNamein interfaceILcdFeaturedDescriptor- Parameters:
aIndex- a valid feature index.- Returns:
- the name of the feature at the given index.
-
getFeatureIndex
Description copied from interface:ILcdFeaturedDescriptorReturns the index of the given feature name if it exists, -1 otherwise.- Specified by:
getFeatureIndexin interfaceILcdFeaturedDescriptor- Parameters:
aName- a feature name.- Returns:
- the index of the given feature name if it exists, -1 otherwise.
-
getFeatureClass
Description copied from interface:ILcdFeaturedDescriptorReturns theClassof the feature at the given index.- Specified by:
getFeatureClassin interfaceILcdFeaturedDescriptor- Parameters:
aIndex- a valid feature index.- Returns:
- the
Classof the feature at the given index.
-