Represents a set of integers, used as an index for arrays. It should be considered as a subset of the interval of integers [0, length-1] inclusive. For example Range(1:11:3) represents the set of integers {1,4,7,10} Immutable. Ranges are monotonically increasing. Elements must be nonnegative. EMPTY is the empty Range. VLEN is for variable length dimensions.
Note last is inclusive, so standard iteration is
for (int i=range.first(); i<=range.last(); i+= range.stride()) { ... } or use: Range.Iterator iter = timeRange.getIterator(); while (iter.hasNext()) { int index = iter.next(); ... }
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.