public class PositionUtil extends Object
Constructor and Description |
---|
PositionUtil() |
Modifier and Type | Method and Description |
---|---|
static List<List<Integer>> |
getGroupedByContiguous(Collection<Integer> numberCollection)
Finds contiguous numbers in a group of numbers.
|
static List<Range> |
getRanges(Collection<Integer> numbers)
Creates
Range s out of list of numbers. |
public static List<List<Integer>> getGroupedByContiguous(Collection<Integer> numberCollection)
See ColumnChooserDialogTest#getGroupedByContiguous()
public static List<Range> getRanges(Collection<Integer> numbers)
Creates Range
s out of list of numbers.
The contiguous numbers are grouped together in Ranges.
Example: 0, 1, 2, 4, 5, 6 will return [[Range(0 - 3)][Range(4 - 7)]]
The last number in the Range is not inclusive.
Copyright © 2013. All Rights Reserved.