Class PsyString
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 PsyConcatenable
PSY_CONCATFields inherited from interface PsyConvertableToInteger
PSY_TOINTEGERFields inherited from interface PsyConvertableToIntegral
PSY_TOINTEGRALFields inherited from interface PsyConvertableToRational
PSY_TORATIONALFields inherited from interface PsyConvertableToReal
PSY_TOREALFields inherited from interface PsyEvaluable
PSY_EVALFields inherited from interface PsyLengthy
PSY_ISEMPTY, PSY_LENGTHFields inherited from interface PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPEFields inherited from interface PsySequential
PSY_FORALLFields inherited from interface PsyStreamable
PSY_STREAMFields inherited from interface PsyTextual
PSY_INDEXOFCHAR, PSY_INDEXOFSUBSTRING, PSY_LOWERCASE, PSY_SPLIT, PSY_UPPERCASE -
Constructor Summary
ConstructorsConstructorDescriptionPsyString(PsyTextual oTextual) Instantiate a newstringobject from the value given astextualobject.Instantiate a newstringobject from the given value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns abooleanobject indicating whether some other object is “equal to” this one.inthashCode()static PsyStringparseLiteral(String image) Returns theconcatenableresult of concatenation of this object and specified object.Returns anintegerrepresenting the length of this object.Converts all of the characters in this object to lower case according to default locale and returns a newstringobject representing the result of the conversion.Returns astringbufferrepresenting this object.Converts all of the characters in this object to upper case according to default locale and returns a newstringobject 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 interface Iterable
forEach, spliteratorMethods inherited from interface PsyIterable
psyStream, psyToArray, psyUniteMethods inherited from interface PsyLengthy
isEmpty, psyIsEmptyMethods inherited from interface PsyObject
convert, execute, invoke, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyType, typeNameMethods inherited from interface PsyStreamable
psyForAllMethods inherited from interface PsyTextual
compareTo, iterator, length, psyEq, psyEval, psyIndexOfChar, psyIndexOfSubstring, psySplit, psyToInteger, psyToIntegral, psyToRational, psyToReal, psyToString
-
Constructor Details
-
PsyString
Instantiate a newstringobject from the given value.- Parameters:
cs- a given value.
-
PsyString
Instantiate a newstringobject from the value given astextualobject.- Parameters:
oTextual- atextualobject.
-
-
Method Details
-
stringValue
Returns a string value of this object.- Specified by:
stringValuein interfacePsyTextual- Returns:
- a string value of this object
-
psyToStringBuffer
Description copied from interface:PsyObjectReturns astringbufferrepresenting this object.- Specified by:
psyToStringBufferin interfacePsyObject- Returns:
- a
stringbufferrepresenting this object
-
psyLength
Description copied from interface:PsyLengthyReturns anintegerrepresenting the length of this object.- Specified by:
psyLengthin interfacePsyLengthy- Returns:
- an
integerlength (in characters) of thisstring.
-
psyConcat
Description copied from interface:PsyConcatenableReturns theconcatenableresult of concatenation of this object and specified object.- Specified by:
psyConcatin interfacePsyConcatenable<PsyString>- Parameters:
oString- the specified object.- Returns:
- the
concatenableresult 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 newstringobject representing the result of the conversion.- Specified by:
psyUpperCasein interfacePsyTextual- Returns:
- a
stringresult of upper-casing.
-
psyLowerCase
Converts all of the characters in this object to lower case according to default locale and returns a newstringobject representing the result of the conversion.- Specified by:
psyLowerCasein interfacePsyTextual- Returns:
- a
stringresult of lower-casing.
-
toSyntaxString
Returns a syntactic representation of this object’s value. Returns a value string prepended with/.- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- a syntactic representation of this object’s value
-
equals
Returns abooleanobject indicating whether some other object is “equal to” this one. Return value istrueif and only if other object hasstringtype and its value is equal to this one’s. -
hashCode
-
parseLiteral
- Throws:
PsySyntaxErrorException
-