Class AnnotatedSpan


  • public class AnnotatedSpan
    extends Object
    Span of text and its annotation data.
    • Field Detail

      • type

        public String type
        Type of annotation.
      • annotation

        public InlineAnnotation annotation
        The annotation itself (can be null).
      • span

        public TextFragment span
        Copy of the fragment of text to which the annotation is applied.
      • range

        public Range range
        The start and end positions of the span of text in the original coded text.
    • Constructor Detail

      • AnnotatedSpan

        public AnnotatedSpan​(String type,
                             InlineAnnotation annotation,
                             TextFragment span,
                             int start,
                             int end)
        Creates a new AnnotatedSpan object with a give type of annotation, its annotation and its fragment of text.
        Parameters:
        type - the type of the annotation for this span of text.
        annotation - the annotation associated with this span of text.
        span - the span of text.
        start - the start position of the span of text in the original coded text.
        end - the end position of the span of text in the original coded text.