net.sf.okapi.common.resource

## Class AnnotatedSpan

- java.lang.Object
- - net.sf.okapi.common.resource.AnnotatedSpan

-     public class AnnotatedSpan
      extends java.lang.Object

  Span of text and its annotation data.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `InlineAnnotation` | `annotation` The annotation itself (can be null).
    `Range` | `range` The start and end positions of the span of text in the original coded text.
    `TextFragment` | `span` Copy of the fragment of text to which the annotation is applied.
    `java.lang.String` | `type` Type of annotation.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnnotatedSpan(java.lang.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.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### type

          public java.lang.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(java.lang.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.