Class Range
java.lang.Object
org.eclipse.nebula.widgets.nattable.coordinate.Range
Represents a consecutive range of numbers, e.g. a range of selected rows: 1 -
100. Ranges are inclusive of their start value and exclusive of their end
value, i.e. start <= x < end
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
start
public int start -
end
public int end
-
-
Constructor Details
-
Range
public Range(int start, int end) Create a newRange.- Parameters:
start- The start position inclusive.end- The end position exclusive.
-
-
Method Details
-
size
public int size()- Returns:
- The size of this range.
-
contains
public boolean contains(int position) Check if the given position is contained in thisRange.- Parameters:
position- the position to check.- Returns:
trueif the range contains the given position.
-
overlap
-
getMembers
- Returns:
- The values represented by this
Range.
-
getMembersArray
public int[] getMembersArray()- Returns:
- The values represented by this
Range. - Since:
- 2.0
-
toString
-
equals
-
hashCode
public int hashCode() -
sortByStart
Helper method to sort a list ofRangeobjects by their start position.- Parameters:
ranges- TheRangelist to sort.
-