Package coneforest.psylla.core
Class PsyName
- java.lang.Object
-
- coneforest.psylla.core.PsyName
-
- All Implemented Interfaces:
PsyAtomic,PsyConvertableToInteger,PsyConvertableToName,PsyConvertableToReal,PsyConvertableToString,PsyEvaluable,PsyIterable<PsyInteger>,PsyLengthy,PsyObject,PsyScalar<PsyTextual>,PsySequential<PsyInteger>,PsyStreamable<PsyInteger>,PsyTextual,Iterable<PsyInteger>
- Direct Known Subclasses:
PsyCommand
public class PsyName extends Object implements PsyAtomic, PsyTextual
A representation of Ψ-name, a type of immutable string.
-
-
Field Summary
-
Fields inherited from interface coneforest.psylla.core.PsyTextual
OPERATORS
-
-
Constructor Summary
Constructors Constructor Description PsyName(PsyTextual oTextual)Instantiate a new Ψ-nameobject with name given as Ψ-textualobject.PsyName(CharSequence cs)Instantiate a new Ψ-nameobject with given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Returns a Ψ-booleanindicating whether some other Ψ-object is “equal to” this one.inthashCode()PsyIntegerpsyLength()Returns a Ψ-integerrepresenting the length of this object.PsyNamepsyLowerCase()Converts all of the characters in this object to lower case according to default locale and returns a new Ψ-nameobject representing the result of the conversion.PsyStringpsyToString()Returns a Ψ-stringrepresenting this object.PsyNamepsyUpperCase()Converts all of the characters in this object to upper case according to default locale and returns a new Ψ-nameobject representing the result of the conversion.StringstringValue()Returns a string value of this object’s value.StringtoSyntaxString()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, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyType, typeName
-
Methods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Methods inherited from interface coneforest.psylla.core.PsyTextual
iterator, length, psyCmp, psyEq, psyEval, psyGe, psyGt, psyIndexOfChar, psyIndexOfSubstring, psyLe, psyLt, psySplit, psyToInteger, psyToName, psyToReal
-
-
-
-
Constructor Detail
-
PsyName
public PsyName(CharSequence cs)
Instantiate a new Ψ-nameobject with given name.- Parameters:
cs- a name.
-
PsyName
public PsyName(PsyTextual oTextual)
Instantiate a new Ψ-nameobject with name given as Ψ-textualobject.- Parameters:
oTextual- a textual.
-
-
Method Detail
-
stringValue
public String stringValue()
Returns a string value of this object’s value.- Specified by:
stringValuein interfacePsyTextual- Returns:
- a string value of this object.
-
psyToString
public PsyString psyToString()
Description copied from interface:PsyObjectReturns a Ψ-stringrepresenting this object.- Specified by:
psyToStringin interfacePsyConvertableToString- Specified by:
psyToStringin interfacePsyObject- Returns:
- a Ψ-
stringrepresenting this object.
-
psyLength
public PsyInteger psyLength()
Description copied from interface:PsyLengthyReturns a Ψ-integerrepresenting the length of this object.- Specified by:
psyLengthin interfacePsyLengthy- Returns:
- a Ψ-
integerlength (in characters) of this name.
-
psyUpperCase
public PsyName psyUpperCase()
Converts all of the characters in this object to upper case according to default locale and returns a new Ψ-nameobject representing the result of the conversion.- Specified by:
psyUpperCasein interfacePsyTextual- Returns:
- a Ψ-
nameresult of upper-casing.
-
psyLowerCase
public PsyName psyLowerCase()
Converts all of the characters in this object to lower case according to default locale and returns a new Ψ-nameobject representing the result of the conversion.- Specified by:
psyLowerCasein interfacePsyTextual- Returns:
- a Ψ-
nameresult of lower-casing.
-
toSyntaxString
public String 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
public boolean equals(Object object)
Returns a Ψ-booleanindicating whether some other Ψ-object is “equal to” this one. Return value istrueif and only if other object has Ψ-nametype and its value is equal to this one’s.
-
-