java.lang.Object
org.refcodes.data.Region
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the beginning index of the region (being semantically included by the region being described).int
Returns the end index of the region (being semantically excluded by the region being described).int
Returns the length of the region as ofgetEndIndex()
-getBeginIndex()
.
-
Field Details
-
_beginIndex
protected int _beginIndex -
_endIndex
protected int _endIndex
-
-
Constructor Details
-
Region
public Region(int aBeginIndex, int aEndIndex) Constructs aRegion
instance.- Parameters:
aBeginIndex
- The beginning index (included) of the text region.aEndIndex
- The end index (being excluded) of the region.
-
-
Method Details
-
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 ofgetEndIndex()
-getBeginIndex()
.- Returns:
- The length of the region.
-