Enum Class ZipFunctions

java.lang.Object
java.lang.Enum<ZipFunctions>
com.blackrook.rookscript.functions.ZipFunctions
All Implemented Interfaces:
ScriptFunctionType, Serializable, Comparable<ZipFunctions>, java.lang.constant.Constable

public enum ZipFunctions extends Enum<ZipFunctions> implements ScriptFunctionType
Script common functions for date/time stuff.
Author:
Matthew Tropiano
  • Enum Constant Details

  • Method Details

    • values

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

      public static ZipFunctions 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.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • createResolver

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

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

      public ScriptFunctionType.Usage getUsage()
      Specified by:
      getUsage in interface ScriptFunctionType
      Returns:
      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
      Parameters:
      scriptInstance - the originating script instance.
      returnValue - the value pushed to the stack on return.
      Returns:
      if false, this halts script execution, else if true, continue.
    • usage

      protected abstract ScriptFunctionType.Usage usage()