Class OffsetAttributeImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int endOffset  
      private int startOffset  
    • Constructor Summary

      Constructors 
      Constructor Description
      OffsetAttributeImpl()
      Initialize this attribute with startOffset and endOffset of 0.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears the values in this AttributeImpl and resets it to its default value.
      void copyTo​(AttributeImpl target)
      Copies the values from this Attribute into the passed-in target attribute.
      int endOffset()
      Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      void reflectWith​(AttributeReflector reflector)
      This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
      void setOffset​(int startOffset, int endOffset)
      Set the starting and ending offset.
      int startOffset()
      Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • startOffset

        private int startOffset
      • endOffset

        private int endOffset
    • Constructor Detail

      • OffsetAttributeImpl

        public OffsetAttributeImpl()
        Initialize this attribute with startOffset and endOffset of 0.