java.lang.Object
coneforest.psylla.core.PsyString
- All Implemented Interfaces:
PsyConcatenable<PsyString>
,PsyConvertableToInteger
,PsyConvertableToIntegral
,PsyConvertableToRational
,PsyConvertableToReal
,PsyEvaluable
,PsyIterable<PsyInteger>
,PsyLengthy
,PsyObject
,PsyScalar<PsyTextual>
,PsySequential<PsyInteger>
,PsyStreamable<PsyInteger>
,PsyTextual
,PsyValue
,Comparable<PsyTextual>
,Iterable<PsyInteger>
- Direct Known Subclasses:
PsyName
@Type("string")
public class PsyString
extends Object
implements PsyTextual, PsyValue, PsyConcatenable<PsyString>
The representation of
string
, an immutable string.-
Field Summary
Fields inherited from interface coneforest.psylla.core.PsyConcatenable
PSY_CONCAT
Fields inherited from interface coneforest.psylla.core.PsyConvertableToInteger
PSY_TOINTEGER
Fields inherited from interface coneforest.psylla.core.PsyConvertableToIntegral
PSY_TOINTEGRAL
Fields inherited from interface coneforest.psylla.core.PsyConvertableToRational
PSY_TORATIONAL
Fields inherited from interface coneforest.psylla.core.PsyConvertableToReal
PSY_TOREAL
Fields inherited from interface coneforest.psylla.core.PsyEvaluable
PSY_EVAL
Fields inherited from interface coneforest.psylla.core.PsyLengthy
PSY_ISEMPTY, PSY_LENGTH
Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE
Fields inherited from interface coneforest.psylla.core.PsyScalar
PSY_CMP, PSY_GE, PSY_GT, PSY_LE, PSY_LT, PSY_MAX, PSY_MIN
Fields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALL
Fields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAM
Fields inherited from interface coneforest.psylla.core.PsyTextual
PSY_INDEXOFCHAR, PSY_INDEXOFSUBSTRING, PSY_LOWERCASE, PSY_SPLIT, PSY_UPPERCASE
-
Constructor Summary
ConstructorsConstructorDescriptionPsyString
(PsyTextual oTextual) Instantiate a newstring
object from the value given astextual
object.Instantiate a newstring
object from the given value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns aboolean
object indicating whether some other object is “equal to” this one.int
hashCode()
static PsyString
parseLiteral
(String image) Returns theconcatenable
result of concatenation of this object and specified object.Returns aninteger
representing the length of this object.Converts all of the characters in this object to lower case according to default locale and returns a newstring
object representing the result of the conversion.Returns astringbuffer
representing this object.Converts all of the characters in this object to upper case according to default locale and returns a newstring
object representing the result of the conversion.Returns a string value of this object.Returns a syntactic representation of this object’s value.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
psyStream, psyToArray, psyUnite
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, psyIsEmpty
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyScalar
psyCmp, psyGe, psyGt, psyLe, psyLt, psyMax, psyMin
Methods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
Methods inherited from interface coneforest.psylla.core.PsyTextual
compareTo, iterator, length, psyEq, psyEval, psyIndexOfChar, psyIndexOfSubstring, psySplit, psyToInteger, psyToIntegral, psyToRational, psyToReal, psyToString
-
Constructor Details
-
PsyString
Instantiate a newstring
object from the given value.- Parameters:
cs
- a given value.
-
PsyString
Instantiate a newstring
object from the value given astextual
object.- Parameters:
oTextual
- atextual
object.
-
-
Method Details
-
stringValue
Returns a string value of this object.- Specified by:
stringValue
in interfacePsyTextual
- Returns:
- a string value of this object
-
psyToStringBuffer
Description copied from interface:PsyObject
Returns astringbuffer
representing this object.- Specified by:
psyToStringBuffer
in interfacePsyObject
- Returns:
- a
stringbuffer
representing this object
-
psyLength
Description copied from interface:PsyLengthy
Returns aninteger
representing the length of this object.- Specified by:
psyLength
in interfacePsyLengthy
- Returns:
- an
integer
length (in characters) of thisstring
.
-
psyConcat
Description copied from interface:PsyConcatenable
Returns theconcatenable
result of concatenation of this object and specified object.- Specified by:
psyConcat
in interfacePsyConcatenable<PsyString>
- Parameters:
oString
- the specified object.- Returns:
- the
concatenable
result of concatenation of this object and specified object
-
psyUpperCase
Converts all of the characters in this object to upper case according to default locale and returns a newstring
object representing the result of the conversion.- Specified by:
psyUpperCase
in interfacePsyTextual
- Returns:
- a
string
result of upper-casing.
-
psyLowerCase
Converts all of the characters in this object to lower case according to default locale and returns a newstring
object representing the result of the conversion.- Specified by:
psyLowerCase
in interfacePsyTextual
- Returns:
- a
string
result of lower-casing.
-
toSyntaxString
Returns a syntactic representation of this object’s value. Returns a value string prepended with/
.- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- a syntactic representation of this object’s value
-
equals
Returns aboolean
object indicating whether some other object is “equal to” this one. Return value istrue
if and only if other object hasstring
type and its value is equal to this one’s. -
hashCode
public int hashCode() -
parseLiteral
- Throws:
PsySyntaxErrorException
-