Class BaseStringReference

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      char charAt​(int index)  
      int compareTo​(java.lang.CharSequence o)
      Compare this StringReference to another StringReference, or more generally to another CharSequence.
      boolean equals​(java.lang.Object o)
      Compares this StringReference to another CharSequence for equality.
      int hashCode()
      Returns a hashcode for this StringReference.
      int length()  
      java.lang.CharSequence subSequence​(int start, int end)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.CharSequence

        chars, codePoints
    • Constructor Detail

      • BaseStringReference

        public BaseStringReference()
    • Method Detail

      • hashCode

        public int hashCode()
        Description copied from interface: StringReference
        Returns a hashcode for this StringReference. This is defined to be getString().hashCode().
        Specified by:
        hashCode in interface StringReference
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code value for this StringReference
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object o)
        Description copied from interface: StringReference
        Compares this StringReference to another CharSequence for equality. String StringReference is equal to a CharSequence iff this.getString().equals(other.toString()). Equivalently, This StringReference is equal to another StringReference iff this.getString().equals(other.getString()).
        Specified by:
        equals in interface StringReference
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - The object to be compared for equality with this TypeReference
        Returns:
        true if the specified object is equal to this TypeReference
      • compareTo

        public int compareTo​(@Nonnull
                             java.lang.CharSequence o)
        Description copied from interface: StringReference
        Compare this StringReference to another StringReference, or more generally to another CharSequence. The comparison is defined to be this.getString().compareTo(other.toString()).
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.CharSequence>
        Specified by:
        compareTo in interface StringReference
        Parameters:
        o - The CharSequence to compare with this StringReference
        Returns:
        An integer representing the result of the comparison
      • length

        public int length()
        Specified by:
        length in interface java.lang.CharSequence
      • charAt

        public char charAt​(int index)
        Specified by:
        charAt in interface java.lang.CharSequence
      • subSequence

        public java.lang.CharSequence subSequence​(int start,
                                                  int end)
        Specified by:
        subSequence in interface java.lang.CharSequence
      • toString

        @Nonnull
        public java.lang.String toString()
        Specified by:
        toString in interface java.lang.CharSequence
        Overrides:
        toString in class java.lang.Object