edu.indiana.iucbrf.feature
Class FeatureMap
java.lang.Object
edu.indiana.iucbrf.feature.AbstractFeatureCollection
edu.indiana.iucbrf.feature.FeatureMap
- All Implemented Interfaces:
- Feature, FeatureCollection, SwingRepresentableWithDomain, SwingRepresentable, java.io.Serializable, java.lang.Comparable
- Direct Known Subclasses:
- OrderedFeatureMap
public class FeatureMap
- extends AbstractFeatureCollection
- See Also:
- Serialized Form
|
Field Summary |
protected java.util.HashMap |
features
|
| Methods inherited from class edu.indiana.iucbrf.feature.AbstractFeatureCollection |
addEstimatedFeature, addFeature, addFeatureCollectionListener, adjust, clearAllEstimates, clearEstimate, clearFeatures, clone, commonInit, compareTo, containsEstimates, equals, fireFeatureAdded, fireFeatureChange, fireFeatureRemoved, fireFeatureReplaced, fireFeaturesCleared, getCollectionType, getConfidence, getCustomTitle, getDefaultVariableType, getFeaturesMatching, getIsReferenceSolution, getKnownFeatureCount, getTitle, isDefinitelyKnown, isEstimated, midpoint, removeFeature, removeFeatureCollectionListener, replaceFeature, setConfidence, setCustomTitle, setIsReferenceSolution, toString, toString, toString, toSwing, toSwing, toSwing, toSwing, toSwing |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
features
protected java.util.HashMap features
FeatureMap
protected FeatureMap()
FeatureMap
public FeatureMap(int collectionType)
- Creates a new instance of FeatureMap
FeatureMap
public FeatureMap(int collectionType,
int initialCapacity)
FeatureMap
public FeatureMap(double[] featureValues,
Domain domain,
int collectionType)
FeatureMap
public FeatureMap(Feature[] features,
Domain domain,
int collectionType)
FeatureMap
public FeatureMap(FeatureKey[] keys,
Feature[] features,
int collectionType)
FeatureMap
public FeatureMap(DoubleCollection someFeatureValues,
Domain domain,
int collectionType)
initializeCollection
protected void initializeCollection(int initialCapacity)
- Description copied from class:
AbstractFeatureCollection
- Override to construct needed object (may ignore initialCapacity if not applicable)
- Specified by:
initializeCollection in class AbstractFeatureCollection
addFeatureImpl
protected void addFeatureImpl(FeatureKey key,
Feature feature)
- Add a feature to the collection.
This method assumes that issues such as type checking and event-handling are already taken care of,
and the feature merely needs to be added to the collection.
- Specified by:
addFeatureImpl in class AbstractFeatureCollection
- Parameters:
feature - The feature to add
clearFeaturesImpl
protected void clearFeaturesImpl()
- Clear all features in this FeatureCollection.
This method assumes that issues such as type checking and event-handling are already taken care of,
and the feature merely needs to be added to the collection.
- Specified by:
clearFeaturesImpl in class AbstractFeatureCollection
getFeature
public Feature getFeature(FeatureKey key)
- Description copied from interface:
FeatureCollection
- If the collection does not have a feature for the given key, null
is returned.
getTotalFeatureCount
public int getTotalFeatureCount()
- Get the number of features in this collection.
featureIterator
public java.util.Iterator featureIterator()
keyIterator
public java.util.Iterator keyIterator()
getKeySet
public java.util.Set getKeySet()
entryIterator
public java.util.Iterator entryIterator()
removeFeatureImpl
protected Feature removeFeatureImpl(FeatureKey key)
- Remove the feature at the given index from this FeatureCollection.
This method assumes that issues such as type checking and event-handling are already taken care of,
and the feature merely needs to be added to the collection.
- Specified by:
removeFeatureImpl in class AbstractFeatureCollection
- Parameters:
index - The index of the feature to be removed.
replaceFeatureImpl
protected Feature replaceFeatureImpl(FeatureKey key,
Feature feature)
- Set the feature at an index in the collection to the given feature.
This method assumes that issues such as type checking and event-handling are already taken care of,
and the feature merely needs to be added to the collection.
- Specified by:
replaceFeatureImpl in class AbstractFeatureCollection
- Returns:
- The old feature value
setValue
public void setValue(java.lang.Object new_value)
getValue
public java.lang.Object getValue()