Package coneforest.psylla.core
Class PsyName
- java.lang.Object
-
- coneforest.psylla.core.PsyName
-
- All Implemented Interfaces:
PsyAtomic,PsyConvertableToInteger,PsyConvertableToIntegral,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 ofnameobject, an immutable string.
-
-
Field Summary
-
Fields inherited from interface coneforest.psylla.core.PsyTextual
OPERATORS
-
-
Constructor Summary
Constructors Constructor Description PsyName(PsyTextual oTextual)Instantiate a newnameobject from the value given astextualobject.PsyName(CharSequence cs)Instantiate a newnameobject from the given value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Returns abooleanobject indicating whether some other object is “equal to” this one.inthashCode()PsyIntegerpsyLength()Returns anintegerrepresenting the length of this object.PsyNamepsyLowerCase()Converts all of the characters in this object to lower case according to default locale and returns a newnameobject representing the result of the conversion.PsyStringpsyToString()Returns astringrepresenting this object.PsyNamepsyUpperCase()Converts all of the characters in this object to upper case according to default locale and returns a newnameobject 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, psyToIntegral, psyToName, psyToReal
-
-
-
-
Constructor Detail
-
PsyName
public PsyName(CharSequence cs)
Instantiate a newnameobject from the given value.- Parameters:
cs- a given value.
-
PsyName
public PsyName(PsyTextual oTextual)
Instantiate a newnameobject from the value given astextualobject.- Parameters:
oTextual- atextualobject.
-
-
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 astringrepresenting this object.- Specified by:
psyToStringin interfacePsyConvertableToString- Specified by:
psyToStringin interfacePsyObject- Returns:
- a
stringrepresenting this object.
-
psyLength
public PsyInteger psyLength()
Description copied from interface:PsyLengthyReturns anintegerrepresenting the length of this object.- Specified by:
psyLengthin interfacePsyLengthy- Returns:
- an
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 newnameobject 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 newnameobject 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 abooleanobject indicating whether some other object is “equal to” this one. Return value istrueif and only if other object hasnametype and its value is equal to this one’s.
-
-