Class Region


  • public class Region
    extends Object
    A text region has a beginning index being included by the region and an end index being excluded by the region and a resulting length.
    • Field Detail

      • _beginIndex

        protected int _beginIndex
      • _endIndex

        protected int _endIndex
    • Constructor Detail

      • Region

        public Region​(int aBeginIndex,
                      int aEndIndex)
        Constructs a Region instance.
        Parameters:
        aBeginIndex - The beginning index (included) of the text region.
        aEndIndex - The end index (being excluded) of the region.
    • Method Detail

      • getBeginIndex

        public int getBeginIndex()
        Returns the beginning index of the region (being semantically included by the region being described).
        Returns:
        The according beginning index (included).
      • getEndIndex

        public int getEndIndex()
        Returns the end index of the region (being semantically excluded by the region being described).
        Returns:
        The according end index (excluded).
      • getLength

        public int getLength()
        Returns the length of the region as of getEndIndex() - getBeginIndex().
        Returns:
        The length of the region.