Package coneforest.psylla.core
Class PsyCommand
- java.lang.Object
-
- coneforest.psylla.core.PsyName
-
- coneforest.psylla.core.PsyCommand
-
- All Implemented Interfaces:
PsyAtomic
,PsyConvertableToInteger
,PsyConvertableToName
,PsyConvertableToReal
,PsyConvertableToString
,PsyEvaluable
,PsyIterable<PsyInteger>
,PsyLengthy
,PsyObject
,PsyScalar<PsyStringy>
,PsyStreamlike<PsyInteger>
,PsyStringy
,Iterable<PsyInteger>
public class PsyCommand extends PsyName
A representation of Ψ-command
object.
-
-
Constructor Summary
Constructors Constructor Description PsyCommand(CharSequence cs)
Creates a new Ψ-command
object with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(Interpreter interpreter)
Execute this object in the context of an interpreter.void
invoke(Interpreter interpreter)
Invoke this object in the context of an interpreter.String
toSyntaxString()
Returns a syntactic representation of this object’s value.-
Methods inherited from class coneforest.psylla.core.PsyName
equals, hashCode, psyLength, psyLowerCase, psyToString, psyUpperCase, stringValue
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyCount, psyFilter, psyForAll, psyMap, psyStream, psyToArray, psyUnite
-
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, psyIsEmpty
-
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyType, typeName
-
Methods inherited from interface coneforest.psylla.core.PsyStreamlike
psyConcat
-
-
-
-
Constructor Detail
-
PsyCommand
public PsyCommand(CharSequence cs)
Creates a new Ψ-command
object with the given name.- Parameters:
cs
- a name.
-
-
Method Detail
-
execute
public void execute(Interpreter interpreter)
Description copied from interface:PsyObject
Execute this object in the context of an interpreter. Pushes this object into interpreter’s operand stack.- Parameters:
interpreter
- an interpreter.
-
invoke
public void invoke(Interpreter interpreter)
Description copied from interface:PsyObject
Invoke this object in the context of an interpreter. Pushes this object into interpreter’s operand stack.- Parameters:
interpreter
- an interpreter.
-
toSyntaxString
public String toSyntaxString()
Description copied from class:PsyName
Returns a syntactic representation of this object’s value. Returns a value string prepended with/
.- Specified by:
toSyntaxString
in interfacePsyObject
- Overrides:
toSyntaxString
in classPsyName
- Returns:
- a syntactic representation of this object’s value.
-
-