Class AttributedString.AttributedInterval

  • Enclosing class:
    AttributedString

    public static class AttributedString.AttributedInterval
    extends java.lang.Object
    A text interval from the string, with a specific attribute.
    • Constructor Detail

      • AttributedInterval

        public AttributedInterval​(int startOffset,
                                  int endOffset,
                                  TextAttribute attribute,
                                  java.lang.Object value)
        Constructor.
        Parameters:
        startOffset - The start offset
        endOffset - The end offset
        attribute - The attribute key
        value - The attribute value
    • Method Detail

      • getStartOffset

        public int getStartOffset()
        Returns:
        Returns the index of the first character of the range.
      • getEndOffset

        public int getEndOffset()
        Returns:
        Returns the Index of the character following the last character.
      • getAttribute

        public TextAttribute getAttribute()
        Returns:
        Returns the attribute.
      • getValue

        public java.lang.Object getValue()
        Returns:
        Returns the value.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)