- java.lang.Object
-
- org.refcodes.data.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 Summary
Fields Modifier and Type Field Description protected int_beginIndexprotected int_endIndex
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBeginIndex()Returns the beginning index of the region (being semantically included by the region being described).intgetEndIndex()Returns the end index of the region (being semantically excluded by the region being described).intgetLength()Returns the length of the region as ofgetEndIndex()-getBeginIndex().
-
-
-
Constructor Detail
-
Region
public Region(int aBeginIndex, int aEndIndex)Constructs aRegioninstance.- 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 ofgetEndIndex()-getBeginIndex().- Returns:
- The length of the region.
-
-