Class ClassifierFunction

java.lang.Object
nz.org.riskscape.defaults.classifier.ClassifierFunction
All Implemented Interfaces:
AutoCloseable, nz.org.riskscape.engine.function.RiskscapeFunction, nz.org.riskscape.engine.function.UntypedFunction, nz.org.riskscape.engine.rl.RealizableFunction

public class ClassifierFunction extends Object implements nz.org.riskscape.engine.function.RiskscapeFunction, nz.org.riskscape.engine.rl.RealizableFunction
  • Nested Class Summary

    Nested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.RealizableFunction

    nz.org.riskscape.engine.rl.RealizableFunction.MetadataIdentifiedRealizableFunction
  • Field Summary

    Fields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction

    BUILT_IN
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClassifierFunction(AST.FunctionDecl ast, nz.org.riskscape.engine.Project project)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static nz.org.riskscape.problem.ResultOrProblems<ClassifierFunction>
    build(nz.org.riskscape.engine.Project project, String source)
     
    call(List<Object> args)
     
    nz.org.riskscape.engine.function.ArgumentList
     
    List<nz.org.riskscape.engine.types.Type>
     
     
    nz.org.riskscape.engine.Project
     
    nz.org.riskscape.engine.types.Type
     
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.IdentifiedFunction>
    identified(nz.org.riskscape.engine.resource.Resource resource)
     
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>
    realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> argumentTypes)
     
     
    nz.org.riskscape.problem.ResultOrProblems<Boolean>
    validate(nz.org.riskscape.engine.rl.RealizationContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction

    builtin, getAggregationFunction, getOverloaded, getRealizable, getTypesFromArguments, identified, identified, isA, setProblemReporter

    Methods inherited from interface nz.org.riskscape.engine.function.UntypedFunction

    close
  • Constructor Details

    • ClassifierFunction

      public ClassifierFunction(AST.FunctionDecl ast, nz.org.riskscape.engine.Project project)
  • Method Details

    • build

      public static nz.org.riskscape.problem.ResultOrProblems<ClassifierFunction> build(nz.org.riskscape.engine.Project project, String source)
    • call

      public Object call(List<Object> args)
      Specified by:
      call in interface nz.org.riskscape.engine.function.UntypedFunction
    • identified

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.IdentifiedFunction> identified(nz.org.riskscape.engine.resource.Resource resource)
    • realize

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> argumentTypes)
      Specified by:
      realize in interface nz.org.riskscape.engine.rl.RealizableFunction
    • getReturnType

      public nz.org.riskscape.engine.types.Type getReturnType()
      Specified by:
      getReturnType in interface nz.org.riskscape.engine.function.RiskscapeFunction
    • getArguments

      public nz.org.riskscape.engine.function.ArgumentList getArguments()
      Specified by:
      getArguments in interface nz.org.riskscape.engine.function.RiskscapeFunction
    • getArgumentTypes

      public List<nz.org.riskscape.engine.types.Type> getArgumentTypes()
      Specified by:
      getArgumentTypes in interface nz.org.riskscape.engine.function.RiskscapeFunction
    • validate

      public nz.org.riskscape.problem.ResultOrProblems<Boolean> validate(nz.org.riskscape.engine.rl.RealizationContext context)
      Specified by:
      validate in interface nz.org.riskscape.engine.function.RiskscapeFunction
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAst

      public AST.FunctionDecl getAst()
    • getProject

      public nz.org.riskscape.engine.Project getProject()