Class Reference<T extends FeatureInput>

Type Parameters:
T - the feature input-type

public class Reference<T extends FeatureInput> extends FeatureGeneric<T>
Uses another feature to calculate the value.

The other feature is identified by it's name, or a string that otherwise resolves to its name.

Author:
Owen Feehan
  • Constructor Details

    • Reference

      public Reference(String id)
      Create with a specific identifier.
      Parameters:
      id - the identifier.
    • Reference

      public Reference()
  • Method Details

    • calculate

      public double calculate(FeatureCalculationInput<T> input) throws FeatureCalculationException
      Description copied from class: Feature
      Calculates a value for some input.
      Specified by:
      calculate in class Feature<T extends FeatureInput>
      Parameters:
      input - the input to the calculation.
      Returns:
      the result of the calculation.
      Throws:
      FeatureCalculationException - if the calculation cannot successfully complete.
    • descriptionLong

      public String descriptionLong()
      Description copied from class: Feature
      A long human-readable description of the feature and some or all of its parameterization.

      This can be overwritten to create an alternative description for features. By default string returned by Feature.describeBean() is used.

      Overrides:
      descriptionLong in class Feature<T extends FeatureInput>
      Returns:
      the description.
    • getId

      public String getId()
      The identifier that uniquely determines the other feature to reference.
    • setId

      public void setId(String id)
      The identifier that uniquely determines the other feature to reference.