Class TLcdHashedFeaturedDescriptor

java.lang.Object
com.luciad.ais.model.TLcdHashedFeaturedDescriptor
All Implemented Interfaces:
ILcdFeaturedDescriptor

public class TLcdHashedFeaturedDescriptor extends Object implements ILcdFeaturedDescriptor
This implementation of ILcdFeaturedDescriptor uses a hashtable to map feature names to feature indices. This provides an efficient getFeatureIndex operation.
  • Constructor Details

    • TLcdHashedFeaturedDescriptor

      public TLcdHashedFeaturedDescriptor(TLcdDataType aDataType)
      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

      public TLcdHashedFeaturedDescriptor(String[] aFeatureNames, Class[] aFeatureClasses)
      Constructs a new TLcdHashFeaturedDescriptor object. A reference is kept to both aFeatureNames and aFeatureClasses; they are not copied.
      Parameters:
      aFeatureNames - the features names
      aFeatureClasses - the feature classes
    • TLcdHashedFeaturedDescriptor

      public TLcdHashedFeaturedDescriptor(ILcdFeaturedDescriptor aFeaturedDescriptor)
      Constructs a TLcdHashedFeaturedDescriptor 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 interface ILcdFeaturedDescriptor
      Returns:
      the number of features.
    • getFeatureName

      public String getFeatureName(int aIndex)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the name of the feature at the given index.
      Specified by:
      getFeatureName in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the name of the feature at the given index.
    • getFeatureIndex

      public int getFeatureIndex(String aName)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the index of the given feature name if it exists, -1 otherwise.
      Specified by:
      getFeatureIndex in interface ILcdFeaturedDescriptor
      Parameters:
      aName - a feature name.
      Returns:
      the index of the given feature name if it exists, -1 otherwise.
    • getFeatureClass

      public Class getFeatureClass(int aIndex)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the Class of the feature at the given index.
      Specified by:
      getFeatureClass in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the Class of the feature at the given index.