Interface PsyExecutable

All Superinterfaces:
PsyObject
All Known Implementing Classes:
PsyConcurrentModificationException, PsyDictStackUnderflowException, PsyDirectoryNotEmptyException, PsyErrorException, PsyFileAccessDeniedException, PsyFileExistsException, PsyFileNotFoundException, PsyFileSystemErrorException, PsyInterruptException, PsyInvalidContextException, PsyInvalidExitException, PsyInvalidExternalException, PsyInvalidRegExpException, PsyInvalidStateException, PsyIOErrorException, PsyLimitCheckException, PsyNotDirectoryException, PsyNotImplementedException, PsyNotLinkException, PsyOperator, PsyProc, PsyRangeCheckException, PsySecurityErrorException, PsyStackUnderflowException, PsySyntaxErrorException, PsyTypeCheckException, PsyUndefinedException, PsyUndefinedResultException, PsyUnmatchedMarkException, PsyUnregisteredException, PsyUnsupportedException

@Type("executable") public interface PsyExecutable extends PsyObject
  • Method Details

    • invoke

      void invoke(PsyContext oContext)
      Description copied from interface: PsyObject
      Invoke this object in the given execution context. Pushes this object into context’s operand stack.
      Specified by:
      invoke in interface PsyObject
      Parameters:
      oContext - the execution context.
    • invokeAndHandle

      default void invokeAndHandle(PsyContext oContext)
    • asPredicate

      default <T extends PsyObject> Predicate<T> asPredicate(PsyContext oContext)
      Returns a Predicate view of this executable.
      Type Parameters:
      T - the type of the input to the predicate.
      Parameters:
      oContext - the context in which this predicate will be invoked.
      Returns:
      a Predicate view of this executable
    • asFunction

      default <T extends PsyObject, R extends PsyObject> Function<T,R> asFunction(PsyContext oContext)
      Returns a Function view of this executable.
      Type Parameters:
      T - the type of the input to the function.
      R - the type of the return value of the function.
      Parameters:
      oContext - the context in which this function will be invoked.
      Returns:
      a Function view of this executable
    • asUnaryOperator

      default <T extends PsyObject> UnaryOperator<T> asUnaryOperator(PsyContext oContext)
      Returns an UnaryOperator view of this executable.
      Type Parameters:
      T - the type of the input to the operator and its return value.
      Parameters:
      oContext - the context in which this operator will be invoked.
      Returns:
      an UnaryOperator view of this executable
    • asBinaryOperator

      default <T extends PsyObject> BinaryOperator<T> asBinaryOperator(PsyContext oContext)
      Returns an BinaryOperator view of this executable.
      Type Parameters:
      T - the type of the inputs to the operator and its return value.
      Parameters:
      oContext - the context in which this operator will be invoked.
      Returns:
      an BinaryOperator view of this executable
    • asComparator

      default <T extends PsyObject> Comparator<T> asComparator(PsyContext oContext)
      Returns an Comparator view of this executable.
      Type Parameters:
      T - the type of the inputs to the comparator.
      Parameters:
      oContext - the context in which this comparator will be invoked.
      Returns:
      an Comparator view of this executable
    • asSupplier

      default <T extends PsyObject> Supplier<T> asSupplier(PsyContext oContext)
      Returns an Supplier view of this executable.
      Type Parameters:
      T - the type of the return value of the supplier.
      Parameters:
      oContext - the context in which this supplier will be invoked.
      Returns:
      an Supplier view of this executable
    • asConsumer

      default <T extends PsyObject> Consumer<T> asConsumer(PsyContext oContext)
      Returns an Consumer view of this executable.
      Type Parameters:
      T - the type of the input to the consumer.
      Parameters:
      oContext - the context in which this consumer will be invoked.
      Returns:
      an Consumer view of this executable