Class Range
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.coordinate.Range
-
public class Range extends Object
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int position)Check if the given position is contained in thisRange.booleanequals(Object obj)Set<Integer>getMembers()int[]getMembersArray()inthashCode()booleanoverlap(Range range)intsize()static voidsortByStart(List<Range> ranges)Helper method to sort a list ofRangeobjects by their start position.StringtoString()
-
-
-
Constructor Detail
-
Range
public Range(int start, int end)Create a newRange.- Parameters:
start- The start position inclusive.end- The end position exclusive.
-
-
Method Detail
-
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
public boolean overlap(Range range)
-
getMembersArray
public int[] getMembersArray()
- Returns:
- The values represented by this
Range. - Since:
- 2.0
-
-