Package mondrian.util
Interface SpatialValueTree2.SpatialRegion
- Enclosing interface:
- SpatialValueTree2
public static interface SpatialValueTree2.SpatialRegion
-
Method Summary
Modifier and TypeMethodDescriptiongetCellValue
(Map<SpatialValueTree2.SpatialDimension, Object> coordinates) Returns the value of a cell.double
getCellValueDouble
(Map<SpatialValueTree2.SpatialDimension, Object> coordinates, boolean[] wasNull) Version ofgetCellValue(java.util.Map)
optimized fordouble
values.int
getCellValueInt
(Map<SpatialValueTree2.SpatialDimension, Object> coordinates, boolean[] wasNull) Version ofgetCellValue(java.util.Map)
optimized forint
values.Returns the specification of this region.
-
Method Details
-
getRequest
SpatialValueTree2.SpatialRegionRequest getRequest()Returns the specification of this region.- Returns:
- Region request
-
getCellValue
Returns the value of a cell.Assumes that this region body is valid for the request. (That is,
SpatialValueTree2.SpatialRegionRequest.mightContainCell(java.util.Map)
would return true.) For example, suppose that the region request was(gender=M, year=any, measure=sales)
this region body is(gender=M, year={2009, 2010}, measure=sales)
and the cell coordinates are(gender=F, year=2009, measure=sales)
Because the coordinate 'gender=F' falls outside the region request, behavior is unspecified. The implementation might return null, throw an error, or return a value for the cell (gender=M, year=2009, measure=sales); any of these behaviors would be valid.
- Parameters:
coordinates
- Value for each dimension- Returns:
- cell value
-
getCellValueInt
Version ofgetCellValue(java.util.Map)
optimized forint
values.If value is null, writes 'true' into wasNull[0] and returns 0. Otherwise, does not modify wasNull.
- Parameters:
coordinates
- Value of each dimensionwasNull
- 1-element array to be informed if value was null- Returns:
- Value, or 0 if value is null
-
getCellValueDouble
double getCellValueDouble(Map<SpatialValueTree2.SpatialDimension, Object> coordinates, boolean[] wasNull) Version ofgetCellValue(java.util.Map)
optimized fordouble
values.If value is null, writes 'true' into wasNull[0] and returns 0. Otherwise, does not modify wasNull.
- Parameters:
coordinates
- Value of each dimensionwasNull
- 1-element array to be informed if value was null- Returns:
- Value, or 0 if value is null
-