Package coneforest.psylla.core
Class PsyString
java.lang.Object
coneforest.psylla.core.PsyString
- All Implemented Interfaces:
PsyAppendable<PsyInteger>
,PsyClearable
,PsyContainer<PsyInteger>
,PsyConvertableToInteger
,PsyConvertableToIntegral
,PsyConvertableToName
,PsyConvertableToReal
,PsyConvertableToString
,PsyEvaluable
,PsyFormalArray<PsyInteger>
,PsyIndexed<PsyInteger,
,PsyInteger> PsyIterable<PsyInteger>
,PsyLengthy
,PsyObject
,PsyScalar<PsyTextual>
,PsySequential<PsyInteger>
,PsyStreamable<PsyInteger>
,PsyTextual
,Iterable<PsyInteger>
An implementation of
string
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new emptystring
object.Creates a newstring
object whose buffer is initialized from string.PsyString
(StringBuilder buffer) Creates a newstring
object with the supplied buffer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(int index) boolean
extract
(int index) get
(int index) Returns the buffer.int
hashCode()
void
insert
(int index, PsyInteger oCharacter) Inserts the specifiedobject
into this array at the position specified by a given index.int
length()
Returns a length of this object.static PsyString
parseLiteral
(String image) void
psyAppend
(PsyInteger oCharacter) Appends a givenobject
to this container.void
psyClear()
Clear this object.psyClone()
Returns a clone of this object.psyExtractInterval
(PsyInteger oStart, PsyInteger oLength) psyGetInterval
(PsyInteger oIndex, PsyInteger oCount) void
psyInsertAll
(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) void
psyPutInterval
(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) void
psySetLength
(PsyInteger oLength) psySlice
(PsyIterable<PsyInteger> oIndices) Returns a container of the same type as this object consisting of keys or indices from giveniterable
and of associated values.Returns astring
representing this object.void
put
(int index, PsyInteger oCharacter) Returns a string value of this object.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.PsyAppendable
psyAppendAll
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty
Methods inherited from interface coneforest.psylla.core.PsyFormalArray
psyDelete, psyEntries, psyExtract, psyGet, psyGetAll, psyInsert, psyKeys, psyKnown, psyPostChop, psyPreChop, psyPrepend, psyPrependAll, psyPut, psyReplicate, psyValues, toSyntaxStringHelper
Methods inherited from interface coneforest.psylla.core.PsyIterable
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, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
Methods inherited from interface coneforest.psylla.core.PsyTextual
iterator, psyCmp, psyEq, psyEval, psyGe, psyGt, psyIndexOfChar, psyIndexOfSubstring, psyLe, psyLt, psySplit, psyToInteger, psyToIntegral, psyToName, psyToReal
-
Field Details
-
OPERATORS
-
-
Constructor Details
-
PsyString
public PsyString()Creates a new emptystring
object. -
PsyString
Creates a newstring
object whose buffer is initialized from string.- Parameters:
string
- a string.
-
PsyString
Creates a newstring
object with the supplied buffer.- Parameters:
buffer
- a buffer.
-
-
Method Details
-
getBuffer
Returns the buffer.- Returns:
- a buffer.
-
psyToString
Description copied from interface:PsyObject
Returns astring
representing this object.- Specified by:
psyToString
in interfacePsyConvertableToString
- Specified by:
psyToString
in interfacePsyObject
- Returns:
- a
string
representing this object.
-
stringValue
Description copied from interface:PsyTextual
Returns a string value of this object.- Specified by:
stringValue
in interfacePsyTextual
- Returns:
- a string value.
-
psyClone
Description copied from interface:PsyObject
Returns a clone of this object.- Specified by:
psyClone
in interfacePsyFormalArray<PsyInteger>
- Specified by:
psyClone
in interfacePsyObject
- Returns:
- a clone of this object.
-
get
- Specified by:
get
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
psyGetInterval
- Specified by:
psyGetInterval
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
put
- Specified by:
put
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
psyPutInterval
public void psyPutInterval(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) throws PsyErrorException - Specified by:
psyPutInterval
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
psyAppend
Description copied from interface:PsyAppendable
Appends a givenobject
to this container.- Specified by:
psyAppend
in interfacePsyAppendable<PsyInteger>
- Parameters:
oCharacter
- anobject
to append.- Throws:
PsyLimitCheckException
-
insert
Description copied from interface:PsyFormalArray
Inserts the specifiedobject
into this array at the position specified by a given index.- Specified by:
insert
in interfacePsyFormalArray<PsyInteger>
- Parameters:
index
- ainteger
index.oCharacter
- aobject
.- Throws:
PsyErrorException
- when an error occurs.
-
psyInsertAll
public void psyInsertAll(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) throws PsyErrorException - Specified by:
psyInsertAll
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
delete
- Specified by:
delete
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
extract
- Specified by:
extract
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
psyExtractInterval
- Specified by:
psyExtractInterval
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
psySlice
Description copied from interface:PsyIndexed
Returns a container of the same type as this object consisting of keys or indices from giveniterable
and of associated values.- Specified by:
psySlice
in interfacePsyFormalArray<PsyInteger>
- Specified by:
psySlice
in interfacePsyIndexed<PsyInteger,
PsyInteger> - Parameters:
oIndices
- an enumeration of keys.- Returns:
- a container.
- Throws:
PsyErrorException
- when key is absent or index is out of range.
-
psySetLength
- Specified by:
psySetLength
in interfacePsyFormalArray<PsyInteger>
- Throws:
PsyErrorException
-
psyClear
public void psyClear()Description copied from interface:PsyClearable
Clear this object.- Specified by:
psyClear
in interfacePsyClearable
-
psyReverse
- Specified by:
psyReverse
in interfacePsyFormalArray<PsyInteger>
-
psyUpperCase
- Specified by:
psyUpperCase
in interfacePsyTextual
-
psyLowerCase
- Specified by:
psyLowerCase
in interfacePsyTextual
-
length
public int length()Description copied from interface:PsyLengthy
Returns a length of this object.- Specified by:
length
in interfacePsyLengthy
- Specified by:
length
in interfacePsyTextual
- Returns:
- a length.
-
equals
-
hashCode
public int hashCode() -
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyFormalArray<PsyInteger>
- Specified by:
toSyntaxString
in interfacePsyObject
-
parseLiteral
- Throws:
PsySyntaxErrorException
-