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_CONCATFields inherited from interface coneforest.psylla.core.PsyConvertableToInteger
PSY_TOINTEGERFields inherited from interface coneforest.psylla.core.PsyConvertableToIntegral
PSY_TOINTEGRALFields inherited from interface coneforest.psylla.core.PsyConvertableToRational
PSY_TORATIONALFields inherited from interface coneforest.psylla.core.PsyConvertableToReal
PSY_TOREALFields inherited from interface coneforest.psylla.core.PsyEvaluable
PSY_EVALFields inherited from interface coneforest.psylla.core.PsyLengthy
PSY_ISEMPTY, PSY_LENGTHFields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPEFields inherited from interface coneforest.psylla.core.PsyScalar
PSY_CMP, PSY_GE, PSY_GT, PSY_LE, PSY_LT, PSY_MAX, PSY_MINFields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALLFields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAMFields inherited from interface coneforest.psylla.core.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 class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface coneforest.psylla.core.PsyIterable
psyStream, psyToArray, psyUniteMethods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, psyIsEmptyMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyType, typeNameMethods inherited from interface coneforest.psylla.core.PsyScalar
psyCmp, psyGe, psyGt, psyLe, psyLt, psyMax, psyMinMethods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAllMethods 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 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
public int hashCode() -
parseLiteral
- Throws:
PsySyntaxErrorException
-