Class SpanImplBase

  • All Implemented Interfaces:
    Span

    public class SpanImplBase
    extends Object
    implements Span
    This helper class represents a span of offsets, for example for the coverage of a specific streak of characters in a text. It is mainly supposed to serve as an extension point for classes that carry more information associated with the span, such as text annotations.
    • Field Detail

      • offsets

        protected org.apache.commons.lang3.Range<Integer> offsets
    • Constructor Detail

      • SpanImplBase

        public SpanImplBase​(org.apache.commons.lang3.Range<Integer> offsets)
    • Method Detail

      • getOffsets

        public org.apache.commons.lang3.Range<Integer> getOffsets()
        Specified by:
        getOffsets in interface Span
      • setOffsets

        public void setOffsets​(org.apache.commons.lang3.Range<Integer> offsets)
      • setBegin

        public void setBegin​(int begin)
      • setEnd

        public void setEnd​(int end)
      • getBegin

        public int getBegin()
        Specified by:
        getBegin in interface Span
      • getEnd

        public int getEnd()
        Specified by:
        getEnd in interface Span