Class CustomValue

java.lang.Object
studio.magemonkey.fabled.data.formula.value.CustomValue
All Implemented Interfaces:
IValue

public class CustomValue extends Object implements IValue
A custom defined value for a formula
  • Constructor Details

    • CustomValue

      public CustomValue(String token)
      A defined value used in formulas
      Parameters:
      token - equation token
  • Method Details

    • compute

      public double compute(double... input)
      Gets the value using the inputs
      Specified by:
      compute in interface IValue
      Parameters:
      input - the input data
      Returns:
      result value
    • getToken

      public String getToken()
      Returns:
      defining token
    • setIndex

      public void setIndex(int index)
      Sets the argument index for the value. This is handled by formulas so you shouldn't need to use this.
      Parameters:
      index - argument index