Enum Class DataIOFunctions

All Implemented Interfaces:
ScriptFunctionType, Serializable, Comparable<DataIOFunctions>, java.lang.constant.Constable

public enum DataIOFunctions extends Enum<DataIOFunctions> implements ScriptFunctionType
Script common functions for generic data I/O.
Matthew Tropiano
  • Enum Constant Details

  • Method Details

    • values

      public static DataIOFunctions[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DataIOFunctions valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • createResolver

      public static final ScriptFunctionResolver createResolver()
      a function resolver that handles all of the functions in this enum.
    • getParameterCount

      public int getParameterCount()
      Specified by:
      getParameterCount in interface ScriptFunctionType
      the total amount of parameters this takes.
    • getUsage

      public ScriptFunctionType.Usage getUsage()
      Specified by:
      getUsage in interface ScriptFunctionType
      this function's usage instructions.
    • execute

      public abstract boolean execute(ScriptInstance scriptInstance, ScriptValue returnValue)
      Description copied from interface: ScriptFunctionType
      Executes this function. The value in returnValue is automatically pushed onto the stack after the call. If a Throwable is thrown from this call, it is wrapped in a ScriptExecutionException. ScriptExecutionExceptions are thrown as-is.
      Specified by:
      execute in interface ScriptFunctionType
      scriptInstance - the originating script instance.
      returnValue - the value pushed to the stack on return.
      if false, this halts script execution, else if true, continue.
    • usage

      protected abstract ScriptFunctionType.Usage usage()