Class Seg


  • public class Seg
    extends java.lang.Object
    Representation of a segment part in a segment list for a sequence it is a Range, either in the base sequence or in the out of base characters for the builder.

    Out of base text offsets are limited to 1GB. Upper bit is used to store repeated and ascii only flags.

    • Field Detail

      • NULL

        public static final Seg NULL
      • ANCHOR_0

        public static final Seg ANCHOR_0
    • Method Detail

      • getStart

        public int getStart()
      • getEnd

        public int getEnd()
      • getSegStart

        public int getSegStart()
      • getSegEnd

        public int getSegEnd()
      • getTextStart

        public int getTextStart()
      • getTextOffset

        public static int getTextOffset​(int startOffset)
      • getTextEnd

        public int getTextEnd()
      • isFirst256Start

        public boolean isFirst256Start()
      • isFirst256Start

        public static boolean isFirst256Start​(int start)
      • isRepeatedTextEnd

        public boolean isRepeatedTextEnd()
      • isRepeatedTextEnd

        public static boolean isRepeatedTextEnd​(int end)
      • isText

        public boolean isText()
      • isBase

        public boolean isBase()
        Test segment type being from original sequence
        Returns:
        true if it is
      • isAnchor

        public boolean isAnchor()
        Test segment type being from original sequence
        Returns:
        true if it is
      • isNull

        public boolean isNull()
      • getRange

        @NotNull
        public Range getRange()
      • length

        public int length()
        Return length of text or if text is null span of range
        Returns:
        length of this part in the sequence
      • toString

        public java.lang.String toString​(@NotNull
                                         java.lang.CharSequence allText)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • segOf

        @NotNull
        public static Seg segOf​(int startOffset,
                                int endOffset)
      • getTextStart

        public static int getTextStart​(int startOffset,
                                       boolean isFirst256)
      • getTextEnd

        public static int getTextEnd​(int startOffset,
                                     boolean isRepeatedText)
      • textOf

        @NotNull
        public static Seg textOf​(int startOffset,
                                 int endOffset,
                                 boolean isFirst256,
                                 boolean isRepeatedText)