Class SegmentedSequenceTree

    • Method Detail

      • getIndexOffset

        public int getIndexOffset​(int index)
        Description copied from interface: BasedSequence
        Get the offset of index in this sequence mapped to offset into BasedSequence.getBaseSequence() and BasedSequence.getBase() original text source. NOTE: if the character at given index does not equal the corresponding character in the base sequence then this method should return -1 otherwise segmented based sequence will be created for original base character
        Parameters:
        index - index for which to get the offset in original source
        Returns:
        offset of index of this sequence in original text
      • charAt

        public char charAt​(int index)
      • subSequence

        @NotNull
        public @NotNull BasedSequence subSequence​(int startIndex,
                                                  int endIndex)
        Description copied from interface: BasedSequence
        Get a portion of this sequence
        Parameters:
        startIndex - offset from startIndex of this sequence
        endIndex - offset from startIndex of this sequence
        Returns:
        based sequence which represents the requested range of this sequence.
      • create

        public static SegmentedSequenceTree create​(@NotNull
                                                   @NotNull BasedSequence baseSeq,
                                                   ISegmentBuilder<?> builder)
        Base Constructor
        Parameters:
        baseSeq - base sequence
        builder - builder containing segments for this sequence
        Returns:
        segmented sequence