Class PsyName

java.lang.Object
coneforest.psylla.core.PsyName
All Implemented Interfaces:
PsyAtomic, PsyConvertableToInteger, PsyConvertableToIntegral, PsyConvertableToReal, PsyEvaluable, PsyIterable<PsyInteger>, PsyLengthy, PsyObject, PsyScalar<PsyTextual>, PsySequential<PsyInteger>, PsyStreamable<PsyInteger>, PsyTextual, Comparable<PsyTextual>, Iterable<PsyInteger>
Direct Known Subclasses:
PsyCommand

@Type("name") public class PsyName extends Object implements PsyAtomic, PsyTextual
The representation of name, an immutable string.
  • Constructor Details

    • PsyName

      public PsyName(CharSequence cs)
      Instantiate a new name object from the given value.
      Parameters:
      cs - a given value.
    • PsyName

      public PsyName(PsyTextual oTextual)
      Instantiate a new name object from the value given as textual object.
      Parameters:
      oTextual - a textual object.
  • Method Details

    • stringValue

      public String stringValue()
      Returns a string value of this object’s value.
      Specified by:
      stringValue in interface PsyTextual
      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 interface PsyObject
      Returns:
      a string representing this object.
    • psyLength

      public PsyInteger psyLength()
      Description copied from interface: PsyLengthy
      Returns an integer representing the length of this object.
      Specified by:
      psyLength in interface PsyLengthy
      Returns:
      an 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 interface PsyTextual
      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 interface PsyTextual
      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 interface PsyObject
      Returns:
      a syntactic representation of this object’s value.
    • equals

      public boolean equals(Object object)
      Returns a boolean object indicating whether some other object is “equal to” this one. Return value is true if and only if other object has name type and its value is equal to this one’s.
      Overrides:
      equals in class Object
      Returns:
      a boolean result.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • parseLiteral

      public static PsyName parseLiteral(String image) throws PsySyntaxErrorException
      Throws:
      PsySyntaxErrorException