public class TLcdHashedFeaturedDescriptor extends Object implementsILcdFeaturedDescriptor
ILcdFeaturedDescriptor
uses a hashtable to
map feature names to feature indices. This provides an efficient
getFeatureIndex
operation.Constructor and Description |
---|
TLcdHashedFeaturedDescriptor(ILcdFeaturedDescriptor aFeaturedDescriptor)
Constructs a
TLcdHashedFeaturedDescriptor given another
featured descriptor. |
TLcdHashedFeaturedDescriptor(String[] aFeatureNames,
Class[] aFeatureClasses)
Constructs a new
TLcdHashFeaturedDescriptor object. |
TLcdHashedFeaturedDescriptor(TLcdDataType aDataType)
Constructs a new hashed featured descriptor that describes features of the
given data type.
|
Modifier and Type | Method and Description |
---|---|
Class |
getFeatureClass(int aIndex)
Returns the
Class of the feature at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
int |
getFeatureIndex(String aName)
Returns the index of the given feature name if it exists, -1 otherwise.
|
String |
getFeatureName(int aIndex)
Returns the name of the feature at the given index.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFeatureUnitOfMeasure
public TLcdHashedFeaturedDescriptor(TLcdDataType aDataType)
aDataType
- The data type of the features that will be described by this
descriptor.public TLcdHashedFeaturedDescriptor(String[] aFeatureNames, Class[] aFeatureClasses)
TLcdHashFeaturedDescriptor
object. A
reference is kept to both aFeatureNames
and
aFeatureClasses
; they are not copied.aFeatureNames
- the features namesaFeatureClasses
- the feature classespublic TLcdHashedFeaturedDescriptor(ILcdFeaturedDescriptor aFeaturedDescriptor)
TLcdHashedFeaturedDescriptor
given another
featured descriptor.aFeaturedDescriptor
- public int getFeatureCount()
ILcdFeaturedDescriptor
getFeatureCount
in interface ILcdFeaturedDescriptor
public String getFeatureName(int aIndex)
ILcdFeaturedDescriptor
getFeatureName
in interface ILcdFeaturedDescriptor
aIndex
- a valid feature index.public int getFeatureIndex(String aName)
ILcdFeaturedDescriptor
getFeatureIndex
in interface ILcdFeaturedDescriptor
aName
- a feature name.public Class getFeatureClass(int aIndex)
ILcdFeaturedDescriptor
Class
of the feature at the given index.getFeatureClass
in interface ILcdFeaturedDescriptor
aIndex
- a valid feature index.Class
of the feature at the given index.