org.eclipse.nebula.widgets.nattable.coordinate
Class PositionUtil

java.lang.Object
  extended by org.eclipse.nebula.widgets.nattable.coordinate.PositionUtil

public class PositionUtil
extends Object


Constructor Summary
PositionUtil()
           
 
Method Summary
static List<List<Integer>> getGroupedByContiguous(Collection<Integer> numberCollection)
          Finds contiguous numbers in a group of numbers.
static List<Range> getRanges(Collection<Integer> numbers)
          Creates Ranges out of list of numbers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionUtil

public PositionUtil()
Method Detail

getGroupedByContiguous

public static List<List<Integer>> getGroupedByContiguous(Collection<Integer> numberCollection)
Finds contiguous numbers in a group of numbers.

See ColumnChooserDialogTest#getGroupedByContiguous()


getRanges

public static List<Range> getRanges(Collection<Integer> numbers)

Creates Ranges 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 © 2014. All rights reserved.