|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Cube<E,T>
A hypercube.
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Compares the specified object with this cube for equality. |
T |
get(List<E> location)
Returns the element at the specified location. |
List<Collection<? extends E>> |
getEdges()
Returns the possible index values of each dimension. |
Cube<E,T> |
getProjection(int index,
E pivot)
Returns a projection of this cube. |
int |
hashCode()
Returns the hash code value for this cube. |
void |
put(List<E> location,
T value)
Sets the element at the specified location to the specified value. |
| Method Detail |
|---|
List<Collection<? extends E>> getEdges()
T get(List<E> location)
location - a list of index values that determines a position int
the cube
NullPointerException - specified location is null.
RuntimeException - if the location is not valid
(the exact type depends on the implementation).
void put(List<E> location,
T value)
location - a list of index values that determines a position int
the cubevalue - new value of the cell at the specified location
UnsupportedOperationException - if this cube is not modifiable.
NullPointerException - specified location is null.
RuntimeException - if the location is not valid
(the exact type depends on the implementation).
Cube<E,T> getProjection(int index,
E pivot)
index - the dimension that will be fixed.pivot - the fixed value of the fixed dimension.
IndexOutOfBoundsException - if the index is out of range
(index < 0 || index >= getEdges().size()).boolean equals(Object o)
true if the given object is also a cube
and the two Cubes represent the same mappings.
More formally, two cubes c1 and c2
represent the same mappings if
new CubeAsMap(c1).equals(new CubeAsMap(c2)).
This ensures that the equals method works properly across
different implementations of the Cube interface.
equals in class Objecto - object to be compared for equality with this cube
true if the specified object is equal to this cubeint hashCode()
c is defined to be
new CubeAsMap(c).hashCode().
This ensures that c1.equals(c2) implies that
c1.hashCode()==c2.hashCode() for any two cubes
c1 and c2,
as required by the general contract of Object.hashCode.
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||