Package coneforest.psylla.core
Interface PsyStringy
-
- All Superinterfaces:
Iterable<PsyInteger>
,PsyConvertableToInteger
,PsyConvertableToName
,PsyConvertableToReal
,PsyConvertableToString
,PsyEvaluable
,PsyIterable<PsyInteger>
,PsyLengthy
,PsyObject
,PsyScalar<PsyStringy>
,PsyStreamlike<PsyInteger>
- All Known Implementing Classes:
PsyCommand
,PsyName
,PsyString
public interface PsyStringy extends PsyEvaluable, PsyConvertableToInteger, PsyConvertableToReal, PsyIterable<PsyInteger>, PsyLengthy, PsyScalar<PsyStringy>
A representation of Ψ-stringy
, a basic type of mutable and immutable strings.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
eval(Interpreter interpreter)
Evaluate this object in the context of given interpreter.default Iterator<PsyInteger>
iterator()
default int
length()
Returns a length of this object.default PsyInteger
psyCmp(PsyStringy oString)
Compares this object against given object and returns a Ψ-integer
indicating the result of the comparison.default PsyBoolean
psyEq(PsyObject o)
default PsyBoolean
psyGe(PsyStringy oString)
Returns a Ψ-boolean
object representing the result of “greater or equal” comparison of this object and a given object.default PsyBoolean
psyGt(PsyStringy oString)
Returns a Ψ-boolean
object representing the result of “greater” comparison of this object and a given object.default PsyBoolean
psyLe(PsyStringy oString)
Returns a Ψ-boolean
object representing the result of “less or equal” comparison of this object and a given object.PsyStringy
psyLowerCase()
default PsyBoolean
psyLt(PsyStringy oString)
Returns a Ψ-boolean
object representing the result of “less” comparison of this object and a given object.default PsyArray
psySplit(PsyRegExp oRegExp)
default PsyInteger
psyToInteger()
default PsyName
psyToName()
Returns a Ψ-name
representing this object.default PsyReal
psyToReal()
PsyStringy
psyUpperCase()
String
stringValue()
Returns a string value of this object.-
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, psyLength
-
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyType, toSyntaxString, typeName
-
Methods inherited from interface coneforest.psylla.core.PsyStreamlike
psyConcat
-
-
-
-
Method Detail
-
stringValue
String stringValue()
Returns a string value of this object.- Returns:
- a string value.
-
psyUpperCase
PsyStringy psyUpperCase()
-
psyLowerCase
PsyStringy psyLowerCase()
-
psyToName
default PsyName psyToName()
Description copied from interface:PsyObject
Returns a Ψ-name
representing this object.- Specified by:
psyToName
in interfacePsyConvertableToName
- Specified by:
psyToName
in interfacePsyObject
- Returns:
- a Ψ-
name
representing this object.
-
eval
default void eval(Interpreter interpreter) throws PsyException
Description copied from interface:PsyEvaluable
Evaluate this object in the context of given interpreter.- Specified by:
eval
in interfacePsyEvaluable
- Parameters:
interpreter
- an interpreter.- Throws:
PsyException
- when an error occurs durind evaluation of this object.
-
psyToInteger
default PsyInteger psyToInteger() throws PsyException
- Specified by:
psyToInteger
in interfacePsyConvertableToInteger
- Throws:
PsyException
-
psyToReal
default PsyReal psyToReal() throws PsySyntaxErrorException
- Specified by:
psyToReal
in interfacePsyConvertableToReal
- Throws:
PsySyntaxErrorException
-
length
default int length()
Description copied from interface:PsyLengthy
Returns a length of this object.- Specified by:
length
in interfacePsyLengthy
- Returns:
- a length.
-
psyEq
default PsyBoolean psyEq(PsyObject o)
-
psyLt
default PsyBoolean psyLt(PsyStringy oString)
Description copied from interface:PsyScalar
Returns a Ψ-boolean
object representing the result of “less” comparison of this object and a given object.- Specified by:
psyLt
in interfacePsyScalar<PsyStringy>
- Parameters:
oString
- an object with which this object is compared.- Returns:
- a Ψ boolean value indicating if this object is less than given object.
-
psyLe
default PsyBoolean psyLe(PsyStringy oString)
Description copied from interface:PsyScalar
Returns a Ψ-boolean
object representing the result of “less or equal” comparison of this object and a given object.- Specified by:
psyLe
in interfacePsyScalar<PsyStringy>
- Parameters:
oString
- an object with which this object is compared.- Returns:
- a Ψ boolean value indicating if this object is less than or equal to given object.
-
psyGt
default PsyBoolean psyGt(PsyStringy oString)
Description copied from interface:PsyScalar
Returns a Ψ-boolean
object representing the result of “greater” comparison of this object and a given object.- Specified by:
psyGt
in interfacePsyScalar<PsyStringy>
- Parameters:
oString
- an object with which this object is compared.- Returns:
- a Ψ-
boolean
result of comparison.
-
psyGe
default PsyBoolean psyGe(PsyStringy oString)
Description copied from interface:PsyScalar
Returns a Ψ-boolean
object representing the result of “greater or equal” comparison of this object and a given object.- Specified by:
psyGe
in interfacePsyScalar<PsyStringy>
- Parameters:
oString
- an object with which this object is compared.- Returns:
- a Ψ-
boolean
result of comparison.
-
psyCmp
default PsyInteger psyCmp(PsyStringy oString)
Description copied from interface:PsyScalar
Compares this object against given object and returns a Ψ-integer
indicating the result of the comparison. Returns negative value if this object is less than given one, zero if this object is equal to given one, and positive value if this object is greater than given one.- Specified by:
psyCmp
in interfacePsyScalar<PsyStringy>
- Parameters:
oString
- an object with which this object is compared.- Returns:
- a result of the comparison.
-
psySplit
default PsyArray psySplit(PsyRegExp oRegExp) throws PsyException
- Throws:
PsyException
-
iterator
default Iterator<PsyInteger> iterator()
- Specified by:
iterator
in interfaceIterable<PsyInteger>
- Specified by:
iterator
in interfacePsyStreamlike<PsyInteger>
-
-