Skip to content

Commit

Permalink
MONDRIAN: Slight modification to the SpatialValueTree. Generic types …
Browse files Browse the repository at this point in the history
…must extend Object so we can guarantee the availability of hashCode() and equals().

[git-p4: depot-paths = "//open/mondrian/": change = 14210]
  • Loading branch information
lucboudreau committed Apr 19, 2011
1 parent 887b482 commit 64063f9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/main/mondrian/util/SpatialValueTree.java
Expand Up @@ -83,7 +83,10 @@
*
* <p>
* By convention, implementations are required to compare all generic types
* using {@link Object#hashCode()} and {@link Object#equals(Object)}.
* using {@link Object#hashCode()} and {@link Object#equals(Object)}. Users of
* this class should also use generic types which implement
* {@link Object#hashCode()} and {@link Object#equals(Object)} to avoid
* performance and consistency issues.
*
* @version $Id$
* @param <K>
Expand All @@ -93,8 +96,9 @@
* @param <V>
* Type of the values to store.
*/
public interface SpatialValueTree<K, E extends Object, V> {

public interface SpatialValueTree
<K extends Object, E extends Object, V extends Object>
{
/**
* Used as a token to represent all the values of an axis.
* Overrides {@link Object#equals(Object)} and
Expand Down Expand Up @@ -146,7 +150,7 @@ public int hashCode() {
* @param regionKey The region key inside of which to search for
* value nodes.
* @return An unordered set of all the unique values intersecting
* with the region and covering it entirely, or an empty list
* with the region and covering it entirely, or an empty set
* otherwise.
*/
Set<V> match(SpatialRegion<K, E> regionKey);
Expand All @@ -168,7 +172,9 @@ public int hashCode() {
* @param <K> Type of the dimension key.
* @param <E> Type of the values along the dimension's axis.
*/
public interface SpatialRegion<K, E extends Object> {
public interface SpatialRegion
<K extends Object, E extends Object>
{
/**
* Provides a list of the dimensions included in this
* region.
Expand Down

0 comments on commit 64063f9

Please sign in to comment.