java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Not.Definition
All Implemented Interfaces:
FunctionDefinition
Enclosing class:
Not

public static final class Not.Definition extends Object implements FunctionDefinition
A FunctionDefinition for the Not function.
  • Method Details

    • getId

      public String getId()
      Description copied from interface: FunctionDefinition
      The ID of this function.
      Specified by:
      getId in interface FunctionDefinition
      Returns:
      The ID string
    • getCost

      public int getCost()
      Description copied from interface: FunctionDefinition
      Returns the relative cost of evaluating this function.

      Lower values indicate cheaper operations. This cost is used by BDD optimizations to prefer evaluating cheaper conditions earlier, enabling short-circuit evaluation to skip expensive operations when possible.

      Specified by:
      getCost in interface FunctionDefinition
      Returns:
      the relative evaluation cost (default: 100)
    • getArguments

      public List<Type> getArguments()
      Description copied from interface: FunctionDefinition
      The arguments to this function.
      Specified by:
      getArguments in interface FunctionDefinition
      Returns:
      The function arguments
    • getReturnType

      public Type getReturnType()
      Description copied from interface: FunctionDefinition
      The return type of this function definition.
      Specified by:
      getReturnType in interface FunctionDefinition
      Returns:
      The function return type
    • evaluate

      public Value evaluate(List<Value> arguments)
      Description copied from interface: FunctionDefinition
      Evaluate the arguments to a given function to compute a result.
      Specified by:
      evaluate in interface FunctionDefinition
      Returns:
      The resulting value
    • createFunction

      public Not createFunction(FunctionNode functionNode)
      Description copied from interface: FunctionDefinition
      Creates a LibraryFunction implementation from the given FunctionNode.
      Specified by:
      createFunction in interface FunctionDefinition
      Parameters:
      functionNode - the function node to deserialize.
      Returns:
      the created LibraryFunction implementation.