java.lang.Object
coneforest.psylla.core.PsyString
- All Implemented Interfaces:
PsyAppendable<PsyInteger>,PsyClearable,PsyContainer<PsyInteger>,PsyConvertableToInteger,PsyConvertableToIntegral,PsyConvertableToReal,PsyEvaluable,PsyFormalArray<PsyInteger>,PsyIndexed<PsyInteger,,PsyInteger> PsyIterable<PsyInteger>,PsyLengthy,PsyObject,PsyScalar<PsyTextual>,PsySequential<PsyInteger>,PsyStreamable<PsyInteger>,PsyTextual,Comparable<PsyTextual>,Iterable<PsyInteger>
@Type("string")
public class PsyString
extends Object
implements PsyTextual, PsyFormalArray<PsyInteger>
An implementation of
string.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of thestringoperator.Fields inherited from interface coneforest.psylla.core.PsyAppendable
PSY_APPEND, PSY_APPENDALLFields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEARFields inherited from interface coneforest.psylla.core.PsyConvertableToInteger
PSY_TOINTEGERFields inherited from interface coneforest.psylla.core.PsyConvertableToIntegral
PSY_TOINTEGRALFields inherited from interface coneforest.psylla.core.PsyConvertableToReal
PSY_TOREALFields inherited from interface coneforest.psylla.core.PsyEvaluable
PSY_EVALFields inherited from interface coneforest.psylla.core.PsyFormalArray
PSY_EXTRACTINTERVAL, PSY_GETINTERVAL, PSY_INSERT, PSY_INSERTALL, PSY_POSTCHOP, PSY_PRECHOP, PSY_PREPEND, PSY_PREPENDALL, PSY_PUTINTERVAL, PSY_REVERSE, PSY_SETLENGTHFields inherited from interface coneforest.psylla.core.PsyIndexed
PSY_DELETE, PSY_ENTRIES, PSY_EXTRACT, PSY_GET, PSY_GETALL, PSY_KEYS, PSY_KNOWN, PSY_PUT, PSY_SLICE, PSY_VALUESFields 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_TONAME, PSY_TOSTRING, 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
ConstructorsConstructorDescriptionCreates a new emptystringobject.Creates a newstringobject whose buffer is initialized from string.PsyString(StringBuilder buffer) Creates a newstringobject with the supplied buffer. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int index) Removes the element at the specified position in this array.booleanextract(int index) get(int index) Returns the element at the specified position in this array.Returns the buffer.inthashCode()voidinsert(int index, PsyInteger oCharacter) Inserts the specifiedobjectinto this array at the position specified by a given index.intlength()Returns a length of this object.static PsyStringparseLiteral(String image) voidpsyAppend(PsyInteger oCharacter) Appends a givenobjectto this container.voidpsyClear()Clear this object.psyClone()Returns a clone of this object.psyExtractInterval(PsyInteger oStart, PsyInteger oLength) psyGetInterval(PsyInteger oIndex, PsyInteger oCount) voidpsyInsertAll(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) voidpsyPutInterval(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) voidpsySetLength(PsyInteger oLength) psySlice(PsyIterable<PsyInteger> oIndices) Returns a container of the same type as this object consisting of keys or indices from giveniterableand of associated values.Returns astringrepresenting this object.voidput(int index, PsyInteger oCharacter) Returns a string value of this object.Returns the syntactic representation of this object.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.PsyAppendable
psyAppendAllMethods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmptyMethods inherited from interface coneforest.psylla.core.PsyFormalArray
psyDelete, psyEntries, psyExtract, psyGet, psyInsert, psyKeys, psyKnown, psyPostChop, psyPreChop, psyPrepend, psyPrependAll, psyPut, psyReplicate, psyValues, toSyntaxStringHelperMethods inherited from interface coneforest.psylla.core.PsyIndexed
psyGetAllMethods inherited from interface coneforest.psylla.core.PsyIterable
psyStream, psyToArray, psyUniteMethods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, psyIsEmpty, psyLengthMethods 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, psyEq, psyEval, psyIndexOfChar, psyIndexOfSubstring, psySplit, psyToInteger, psyToIntegral, psyToName, psyToReal
-
Field Details
-
PSY_STRING
Context action of thestringoperator.
-
-
Constructor Details
-
PsyString
public PsyString()Creates a new emptystringobject. -
PsyString
Creates a newstringobject whose buffer is initialized from string.- Parameters:
string- a string.
-
PsyString
Creates a newstringobject with the supplied buffer.- Parameters:
buffer- a buffer.
-
-
Method Details
-
getBuffer
Returns the buffer.- Returns:
- a buffer.
-
psyToString
Description copied from interface:PsyObjectReturns astringrepresenting this object.- Specified by:
psyToStringin interfacePsyObject- Returns:
- a
stringrepresenting this object.
-
stringValue
Description copied from interface:PsyTextualReturns a string value of this object.- Specified by:
stringValuein interfacePsyTextual- Returns:
- a string value.
-
psyClone
Description copied from interface:PsyObjectReturns a clone of this object.- Specified by:
psyClonein interfacePsyFormalArray<PsyInteger>- Specified by:
psyClonein interfacePsyObject- Returns:
- a clone of this object.
-
get
Description copied from interface:PsyFormalArrayReturns the element at the specified position in this array.- Specified by:
getin interfacePsyFormalArray<PsyInteger>- Parameters:
index- the index of the element.- Returns:
- the element at the specified position in this list.
- Throws:
PsyRangeCheckException- if the index is out of range.
-
psyGetInterval
- Specified by:
psyGetIntervalin interfacePsyFormalArray<PsyInteger>- Throws:
PsyRangeCheckException
-
put
- Specified by:
putin interfacePsyFormalArray<PsyInteger>- Throws:
PsyRangeCheckException
-
psyPutInterval
public void psyPutInterval(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) throws PsyRangeCheckException - Specified by:
psyPutIntervalin interfacePsyFormalArray<PsyInteger>- Throws:
PsyRangeCheckException
-
psyAppend
Description copied from interface:PsyAppendableAppends a givenobjectto this container.- Specified by:
psyAppendin interfacePsyAppendable<PsyInteger>- Parameters:
oCharacter- anobjectto append.- Throws:
PsyLimitCheckException- when TODO.
-
insert
Description copied from interface:PsyFormalArrayInserts the specifiedobjectinto this array at the position specified by a given index.- Specified by:
insertin interfacePsyFormalArray<PsyInteger>- Parameters:
index- aintegerindex.oCharacter- aobject.- Throws:
PsyRangeCheckException- when TODO.
-
psyInsertAll
public void psyInsertAll(PsyInteger oIndex, PsyIterable<? extends PsyInteger> oIterable) throws PsyRangeCheckException - Specified by:
psyInsertAllin interfacePsyFormalArray<PsyInteger>- Throws:
PsyRangeCheckException
-
delete
Description copied from interface:PsyFormalArrayRemoves the element at the specified position in this array.- Specified by:
deletein interfacePsyFormalArray<PsyInteger>- Parameters:
index- the index of the element to be removed.- Throws:
PsyRangeCheckException- if the index is out of range.
-
extract
- Specified by:
extractin interfacePsyFormalArray<PsyInteger>- Throws:
PsyRangeCheckException
-
psyExtractInterval
public PsyString psyExtractInterval(PsyInteger oStart, PsyInteger oLength) throws PsyRangeCheckException - Specified by:
psyExtractIntervalin interfacePsyFormalArray<PsyInteger>- Throws:
PsyRangeCheckException
-
psySlice
public PsyString psySlice(PsyIterable<PsyInteger> oIndices) throws PsyRangeCheckException, PsyLimitCheckException Description copied from interface:PsyIndexedReturns a container of the same type as this object consisting of keys or indices from giveniterableand of associated values.- Specified by:
psySlicein interfacePsyFormalArray<PsyInteger>- Specified by:
psySlicein interfacePsyIndexed<PsyInteger,PsyInteger> - Parameters:
oIndices- an enumeration of keys.- Returns:
- a container.
- Throws:
PsyRangeCheckException- when the index is out of range.PsyLimitCheckException- when TODO
-
psySetLength
- Specified by:
psySetLengthin interfacePsyFormalArray<PsyInteger>- Throws:
PsyLimitCheckExceptionPsyRangeCheckException
-
psyClear
public void psyClear()Description copied from interface:PsyClearableClear this object.- Specified by:
psyClearin interfacePsyClearable
-
psyReverse
- Specified by:
psyReversein interfacePsyFormalArray<PsyInteger>
-
psyUpperCase
- Specified by:
psyUpperCasein interfacePsyTextual
-
psyLowerCase
- Specified by:
psyLowerCasein interfacePsyTextual
-
length
public int length()Description copied from interface:PsyLengthyReturns a length of this object.- Specified by:
lengthin interfacePsyLengthy- Specified by:
lengthin interfacePsyTextual- Returns:
- a length.
-
equals
-
hashCode
public int hashCode() -
toSyntaxString
Description copied from interface:PsyObjectReturns the syntactic representation of this object.- Specified by:
toSyntaxStringin interfacePsyFormalArray<PsyInteger>- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- the syntactic representation of this object.
-
parseLiteral
- Throws:
PsySyntaxErrorException
-