java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.CurriedOperator
All Implemented Interfaces:
IOperator

public class CurriedOperator extends Object implements IOperator
An operator that is partially being applied.
  • Constructor Details

    • CurriedOperator

      public CurriedOperator(IOperator baseOperator, IVariable... appliedVariables)
  • Method Details

    • getAppliedSymbol

      protected String getAppliedSymbol()
    • getSymbol

      public String getSymbol()
      Specified by:
      getSymbol in interface IOperator
      Returns:
      The unique name of this operator that will also be used for display.
    • getUniqueName

      public net.minecraft.resources.ResourceLocation getUniqueName()
      Specified by:
      getUniqueName in interface IOperator
      Returns:
      The unique name for this operator, only used for internal storage.
    • getInteractName

      public String getInteractName()
      Specified by:
      getInteractName in interface IOperator
      Returns:
      The unique interact name for this operator, when interacting with this operator using external contexts, such as Integrated Scripting.
    • getGlobalInteractNamePrefix

      @Nullable public @Nullable String getGlobalInteractNamePrefix()
      Specified by:
      getGlobalInteractNamePrefix in interface IOperator
      Returns:
      Override for the default global interact name prefix.
    • shouldAlsoPrefixLocalScope

      public boolean shouldAlsoPrefixLocalScope()
      Specified by:
      shouldAlsoPrefixLocalScope in interface IOperator
      Returns:
      If the global interact name prefix should also be used for local scopes.
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface IOperator
      Returns:
      The unique unlocalized name for this operator.
    • getUnlocalizedCategoryName

      public String getUnlocalizedCategoryName()
      Specified by:
      getUnlocalizedCategoryName in interface IOperator
      Returns:
      The unique unlocalized category name for this operator.
    • getLocalizedNameFull

      public net.minecraft.network.chat.MutableComponent getLocalizedNameFull()
      Specified by:
      getLocalizedNameFull in interface IOperator
      Returns:
      The localized full name for this operator, includes category name
    • loadTooltip

      public void loadTooltip(List<net.minecraft.network.chat.Component> lines, boolean appendOptionalInfo)
      Description copied from interface: IOperator
      Add tooltip lines for this aspect when hovered in a gui.
      Specified by:
      loadTooltip in interface IOperator
      Parameters:
      lines - The list to add lines to.
      appendOptionalInfo - If shift-to-show info should be added.
    • getInputTypes

      public IValueType[] getInputTypes()
      Specified by:
      getInputTypes in interface IOperator
      Returns:
      The ordered types of values that are used as input for this operator.
    • getOutputType

      public IValueType getOutputType()
      Specified by:
      getOutputType in interface IOperator
      Returns:
      The type of value that is achieved when this operator is executed.
    • deriveFullInputVariables

      protected IVariable[] deriveFullInputVariables(IVariable[] partialInput)
    • deriveFullInputTypes

      protected IValueType[] deriveFullInputTypes(IValueType[] partialInput)
    • getConditionalOutputType

      public IValueType getConditionalOutputType(IVariable[] input)
      Description copied from interface: IOperator
      Get the output value type depending on the active input of the operator.
      Specified by:
      getConditionalOutputType in interface IOperator
      Parameters:
      input - The input that would be given during evaluation.
      Returns:
      The type of value that is achieved when this operator is executed.
    • evaluate

      public IValue evaluate(IVariable[] input) throws EvaluationException
      Description copied from interface: IOperator
      Evaluate the given input values for this operator.
      Specified by:
      evaluate in interface IOperator
      Parameters:
      input - The ordered input values.
      Returns:
      The output value.
      Throws:
      EvaluationException - When something went wrong while evaluating.
    • getRequiredInputLength

      public int getRequiredInputLength()
      Specified by:
      getRequiredInputLength in interface IOperator
      Returns:
      The required input length.
    • validateTypes

      public net.minecraft.network.chat.MutableComponent validateTypes(IValueType[] input)
      Description copied from interface: IOperator
      Check the given input value types for this operator.
      Specified by:
      validateTypes in interface IOperator
      Parameters:
      input - The ordered input value types.
      Returns:
      An error or null if valid.
    • getRenderPattern

      public IConfigRenderPattern getRenderPattern()
      Specified by:
      getRenderPattern in interface IOperator
      Returns:
      The render pattern for this operator inside the logic programmer.
    • materialize

      public IOperator materialize() throws EvaluationException
      Description copied from interface: IOperator
      Materialize this operator so that it can exist without any external references.
      Specified by:
      materialize in interface IOperator
      Returns:
      The materialized operator.
      Throws:
      EvaluationException - if materialization fails because of a variable evaluation.
    • getBaseOperator

      public IOperator getBaseOperator()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object