Class SharedFeaturesSubset<T extends FeatureInput>

Object
SharedFeaturesSubset<T>
Type Parameters:
T - the feature input-type

public class SharedFeaturesSubset<T extends FeatureInput> extends Object
A subset of features from SharedFeatures that share a common feature input-type.
Author:
Owen Feehan
  • Constructor Details

    • SharedFeaturesSubset

      public SharedFeaturesSubset(NameValueMap<Feature<T>> map)
      Creates a new SharedFeaturesSubset instance.
      Parameters:
      map - A map from the name of a feature to the feature-instance.
  • Method Details

    • initializeRecursive

      public void initializeRecursive(FeatureInitialization initialization, Logger logger) throws InitializeException
      Initialize all features in this instance, recursively also initializating any child-features.
      Parameters:
      initialization - the parameters for initialization.
      logger - a logger that becomes associated with each Feature for messages or errors.
      Throws:
      InitializeException - if any feature cannot be successfully initialized.
    • forEach

      public void forEach(Consumer<Feature<T>> consumer)
      Iterates over each feature in the instance.
      Parameters:
      consumer - called on each feature in the instance.
    • getException

      public Feature<T> getException(String name) throws NamedProviderGetException
      Gets a feature by name, throwing an exception if it doesn't exist.
      Parameters:
      name - the name of the feature.
      Returns:
      the feature.
      Throws:
      NamedProviderGetException - if no feature with name exists in this instance.