Class JsRangeSet

java.lang.Object
io.deephaven.web.client.api.JsRangeSet

@JsType(namespace="dh", name="RangeSet") public class JsRangeSet extends Object
This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015 Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size. Additionally, we may add support for creating RangeSet objects to better serve some use cases.
  • Constructor Details

    • JsRangeSet

      @JsIgnore public JsRangeSet(RangeSet range)
  • Method Details

    • ofRange

      public static JsRangeSet ofRange(double first, double last)
    • ofItems

      public static JsRangeSet ofItems(double[] rows)
    • ofRanges

      public static JsRangeSet ofRanges(JsRangeSet[] ranges)
    • ofSortedRanges

      public static JsRangeSet ofSortedRanges(JsRangeSet[] ranges)
    • iterator

      public JsIterator<LongWrapper> iterator()
      a new iterator over all indexes in this collection.
      Returns:
      Iterator of LongWrapper
    • getSize

      @JsProperty public double getSize()
      The total count of items contained in this collection. In some cases this can be expensive to compute, and generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this property each time through a loop).
      Returns:
      double
    • getRange

      @JsIgnore public RangeSet getRange()