Package coneforest.psylla.core
Class PsyOperator
java.lang.Object
coneforest.psylla.core.PsyOperator
- All Implemented Interfaces:
PsyAtomic
,PsyConvertableToName
,PsyConvertableToString
,PsyExecutable
,PsyObject
- Direct Known Subclasses:
PsyOperator.Action
,PsyOperator.Arity00
,PsyOperator.Arity01
,PsyOperator.Arity10
,PsyOperator.Arity11
,PsyOperator.Arity20
,PsyOperator.Arity21
,PsyOperator.Arity30
,PsyOperator.Arity31
,PsyOperator.Method
A representation of
operator
object.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
PsyOperator.Arity10<T extends PsyObject>
static class
PsyOperator.Arity11<T extends PsyObject>
static class
PsyOperator.Arity20<T1 extends PsyObject,
T2 extends PsyObject> static class
PsyOperator.Arity21<T1 extends PsyObject,
T2 extends PsyObject> static class
static class
static class
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
action
(PsyContext oContext) void
execute
(PsyContext oContext) Execute this object in the context of the interpreter.getName()
Returns a name of this operator.void
invoke
(PsyContext oContext) Invoke this object in the context of the interpreter performing an action associated with it.Returns a syntatctic string representation of this operator.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface coneforest.psylla.core.PsyExecutable
asBinaryOperator, asComparator, asConsumer, asFunction, asPredicate, asSupplier, asUnaryOperator, invokeAndWait
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
-
Constructor Details
-
PsyOperator
-
-
Method Details
-
execute
Execute this object in the context of the interpreter. Callsinvoke(coneforest.psylla.core.PsyContext)
method. -
invoke
Invoke this object in the context of the interpreter performing an action associated with it.- Specified by:
invoke
in interfacePsyExecutable
- Specified by:
invoke
in interfacePsyObject
- Parameters:
oContext
- the context
-
action
- Throws:
ClassCastException
PsyErrorException
-
toSyntaxString
Returns a syntatctic string representation of this operator. A syntatctic representation has a form of"--name--"
, wherename
is a string returned bygetName()
method.- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- a syntatctic string representation of a name of this operator.
-
getName
Returns a name of this operator. A name returned is an operator’s simple class name with first character (underscore) discarded. This method must be overriden when using another naming scheme.- Returns:
- a name.
-
getPrefix
-
getSimpleName
-