Package dap4.servlet
Class Odometer
java.lang.Object
dap4.servlet.Odometer
- All Implemented Interfaces:
Iterator<ucar.ma2.Index>
- Direct Known Subclasses:
MultiOdometer,ScalarOdometer
A classic implementation of an odometer
taken from the netcdf-c code.
Extended to provide iterator interface
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<dap4.core.util.Slice>booleanhasNext()longindex()Compute the linear index from the current odometer indices.dap4.dap4lib.D4Indexindices()Return current set of indicesbooleanisMulti()booleanisScalar()dap4.dap4lib.D4Indexnext()intrank()Return odometer rankvoidremove()protected voidreset()dap4.core.util.Sliceslice(int i) Return ith sliceintstep(int firstpos, int lastpos) toString()longCompute the total number of elements.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
state
-
rank
protected int rank -
slices
-
dimset
-
index
protected dap4.dap4lib.D4Index index -
endpoint
protected long[] endpoint
-
-
Constructor Details
-
Method Details
-
reset
protected void reset() -
toString
-
rank
public int rank()Return odometer rank -
slice
public dap4.core.util.Slice slice(int i) Return ith slice -
getSlices
-
index
public long index()Compute the linear index from the current odometer indices. -
indices
public dap4.dap4lib.D4Index indices()Return current set of indices -
totalSize
public long totalSize()Compute the total number of elements. -
hasNext
public boolean hasNext() -
next
public dap4.dap4lib.D4Index next() -
remove
public void remove() -
step
public int step(int firstpos, int lastpos) -
getSubOdometers
-
isMulti
public boolean isMulti() -
isScalar
public boolean isScalar()
-