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<PsyStringy>
,PsyStreamlike<PsyInteger>
,PsyStringy
,Iterable<PsyInteger>
- Direct Known Subclasses:
PsyCommand
public class PsyName extends Object implements PsyAtomic, PsyStringy
A representation of Ψ-name
, a type of immutable string.
-
-
Constructor Summary
Constructors Constructor Description PsyName(PsyStringy oStringy)
Instantiate a new Ψ-name
object with name given as Ψ-stringy
object.PsyName(CharSequence cs)
Instantiate a new Ψ-name
object with given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Returns a Ψ-boolean
indicating whether some other Ψ-object is “equal to” this one.int
hashCode()
PsyInteger
psyLength()
Returns a Ψ-integer
representing the length of this object.PsyName
psyLowerCase()
Converts all of the characters in this object to lower case according to default locale and returns a new Ψ-name
object representing the result of the conversion.PsyString
psyToString()
Returns a Ψ-string
representing this object.PsyName
psyUpperCase()
Converts all of the characters in this object to upper case according to default locale and returns a new Ψ-name
object representing the result of the conversion.String
stringValue()
Returns a string value of this object’s value.String
toSyntaxString()
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
psyCount, psyFilter, psyForAll, psyMap, 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.PsyStreamlike
psyConcat
-
-
-
-
Constructor Detail
-
PsyName
public PsyName(CharSequence cs)
Instantiate a new Ψ-name
object with given name.- Parameters:
cs
- a name.
-
PsyName
public PsyName(PsyStringy oStringy)
Instantiate a new Ψ-name
object with name given as Ψ-stringy
object.- Parameters:
oStringy
- a stringy.
-
-
Method Detail
-
stringValue
public String stringValue()
Returns a string value of this object’s value.- Specified by:
stringValue
in interfacePsyStringy
- Returns:
- a string value of this object.
-
psyToString
public PsyString psyToString()
Description copied from interface:PsyObject
Returns a Ψ-string
representing this object.- Specified by:
psyToString
in interfacePsyConvertableToString
- Specified by:
psyToString
in interfacePsyObject
- Returns:
- a Ψ-
string
representing this object.
-
psyLength
public PsyInteger psyLength()
Description copied from interface:PsyLengthy
Returns a Ψ-integer
representing the length of this object.- Specified by:
psyLength
in interfacePsyLengthy
- Returns:
- a Ψ-
integer
length (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 Ψ-name
object representing the result of the conversion.- Specified by:
psyUpperCase
in interfacePsyStringy
- Returns:
- a Ψ-
name
result 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 Ψ-name
object representing the result of the conversion.- Specified by:
psyLowerCase
in interfacePsyStringy
- Returns:
- a Ψ-
name
result of lower-casing.
-
toSyntaxString
public String toSyntaxString()
Returns a syntactic representation of this object’s value. Returns a value string prepended with/
.- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- a syntactic representation of this object’s value.
-
equals
public boolean equals(Object object)
Returns a Ψ-boolean
indicating whether some other Ψ-object is “equal to” this one. Return value istrue
if and only if other object has Ψ-name
type and its value is equal to this one’s.
-
-