|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MultidimCube<V>
Interface for storage and access to multi-dimensional data. Implementations store cells for each of multiple dimensions. Implementations have a configurable number of dimensions, and the number of dimensions doesn't change. Cell objects are supplied via the template. The identification of a cell in the cube occurs by member values for each dimension. The MultiKeyUntyped class is used to supply these member values for all dimensions, also referred to as coordinates. Each Object in the MultiKeyUntyped is the (new or existng) member of a single dimension. Implementations typically supports 1 to an unlimited number of dimensions. Implementations can typically grows the members in each dimension as new dimension members become known. The members of each dimension can be supplied via a setter method. This is an example of a 2-dimensional cube. The numbers in [] brackets are indizes per dimension, ie. [n,m] where n=dimension zero index and m=dimension one index. The number in each cell is the ordinal between 0 and 11. a b c d === === === === x [0,0] 0 [1,0] 1 [2,0] 2 [3,0] 3 y 4 5 6 [3,1] 7 z 8 9 10 [3,2] 11 Example: looking for (d,y) yields [3,1] with ordinal 7.
Method Summary | |
---|---|
V |
getCell(MultiKeyUntyped coordinates)
Get a cell, returns null if the cell does not yet exist. |
V |
getCellAddMembers(MultiKeyUntyped coordinates)
Get a cell adding the coordinate members if the cell does not yet exist. |
V[] |
getCells()
Returns all cells. |
String[] |
getDimensionNames()
Returns array containing name of each dimension including the name of the cell. |
List<Object> |
getMembers(int dimension)
Get the members making up a dimension. |
int |
getNumDimensions()
Get the number of dimensions of the cube. |
void |
setMembers(int dimension,
Class enumType)
Set dimension members from the enumeration Class. |
void |
setMembers(int dimension,
List<Object> members)
Set dimension members from the list of value objects. |
Method Detail |
---|
int getNumDimensions()
String[] getDimensionNames()
void setMembers(int dimension, Class enumType)
dimension
- starts at 0 and has a max of number of dimensions minus 1enumType
- is the class for which the enum constants are obtained, and used as membersvoid setMembers(int dimension, List<Object> members)
dimension
- starts at 0 and has a max of number of dimensions minus 1members
- is a list of objects making up the dimension member valuesList<Object> getMembers(int dimension)
dimension
- for which to return the members
V getCell(MultiKeyUntyped coordinates)
coordinates
- contains member values for each dimension of the cube
V getCellAddMembers(MultiKeyUntyped coordinates)
coordinates
- contains member values for each dimension of the cube
V[] getCells()
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |