public class MBArrayStop extends Object
MBFunction.isArrayFunction()), providing
methods to access the stop key and stop value array, as well as a method to reduce it from an
array stop to a single-value stop (for a given index).
For example, the following "stops" list contains two MBArrayStops. (for each stop, the
stop value is an array).
'stops': [
// [stopkey, stopValueArray]
[0, [0,10]],
[100, [2,15]]
]
Used by MBFunction.splitArrayFunction() to split an array function into multiple
functions, one for each dimension in the output array.
| Modifier and Type | Field and Description |
|---|---|
JSONArray |
json |
JSONArray |
stopValueArray |
| Constructor and Description |
|---|
MBArrayStop(JSONArray array) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getStopKey()
Get the stop key for this stop.
|
Object |
getStopValue(int idx)
Returns the value from the stop value array at the provided index.
|
int |
getStopValueCount()
Returns the size of the array of stop values.
|
JSONArray |
reducedToIndex(int idx)
Returns the JSON for a new stop derived from this stop, but reduced to a single-value stop
with the value from the provided index.
|
public Object getStopKey()
For example, for the following MBArrayStop: [1, [0,10]] the output
of stop.getStopKey() is 1.
public int getStopValueCount()
For example, for the following MBArrayStop: [0, [0,10]] the output
of stop.getStopValueCount() is 2.
public Object getStopValue(int idx)
For example, for the following MBArrayStop: [0, [0,10]], the output
of stop.getStopValue(1) is 10.
idx - The index to look up in the stop value array.public JSONArray reducedToIndex(int idx)
For example, for the MBArrayStop [0, [0,10]], The output of
stop.reducedToIndex(1) is the following new stop: [0, 10]
idx - The index to use as the single value for the new stop.Copyright © 1996–2021 Geotools. All rights reserved.