Class StrVal

All Implemented Interfaces:
Comparable<StrVal>, HostResult

public class StrVal extends Val implements Comparable<StrVal>
See Also:
  • Method Details

    • string

      public String string()
      Returns the string.
      Returns:
      the string.
    • isEmpty

      public boolean isEmpty()
      Returns whether the string is empty.
      Returns:
      whether the string is empty.
    • concat

      public StrVal concat(StrVal tail)
      Returns a str val concatenating this and tail.
      Parameters:
      tail - str val to concatenate.
      Returns:
      a str val concatenating this and tail.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

      public boolean equals(Object arg)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(StrVal arg)
      Compares two str values in the order of code points.
      Specified by:
      compareTo in interface Comparable<StrVal>
      Parameters:
      arg - the str value to be compared.
      Returns:
      0 if two strings are equal; less than 0 if this string is smaller; otherwise greater than 0.