Package io.deephaven.web.client.api
Class JsRangeSet
java.lang.Object
io.deephaven.web.client.api.JsRangeSet
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRange()doublegetSize()The total count of items contained in this collection.iterator()a new iterator over all indexes in this collection.static JsRangeSetofItems(double[] rows) static JsRangeSetofRange(double first, double last) static JsRangeSetofRanges(JsRangeSet[] ranges) static JsRangeSetofSortedRanges(JsRangeSet[] ranges)
-
Constructor Details
-
Method Details
-
ofRange
-
ofItems
-
ofRanges
-
ofSortedRanges
-
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
-