dm.datacube
Class DCComp
java.lang.Object
|
+--dm.datacube.DCComp
- All Implemented Interfaces:
- java.util.Comparator
- public class DCComp
- extends java.lang.Object
- implements java.util.Comparator
Implements an object for identifying internal datacube structure
- Author:
- Scott Sanner
Constructor Summary |
DCComp(java.util.ArrayList comparison_order)
Constructor |
Method Summary |
void |
addDim(java.lang.Integer dim_index)
Add a dimension for comparison |
void |
addRestriction(java.lang.Integer dim_index,
java.lang.Integer value)
Add a dimension for comparison |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
The Comparator compare(...) implementation |
void |
dropDim(java.lang.Integer dim_index)
Drop a dimension from the comparison |
void |
dropRestriction(java.lang.Integer dim_index)
Drop a dimension from the comparison |
boolean |
equals(java.lang.Object obj)
Just a way to determine if two Comparators enforce
the same ordering. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_alCompOrder
public java.util.ArrayList _alCompOrder
- Local data members
_hmRestrictions
public java.util.HashMap _hmRestrictions
DCComp
public DCComp(java.util.ArrayList comparison_order)
- Constructor
- Parameters:
comparison_order
- The order in which to sort indices in
the data cube (contains Integers).
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- The Comparator compare(...) implementation
- Specified by:
compare
in interface java.util.Comparator
- Parameters:
o1
- First object in comparisono2
- Second object in comparison- Returns:
- (-1) if o1o2, (0) if equal
addRestriction
public void addRestriction(java.lang.Integer dim_index,
java.lang.Integer value)
- Add a dimension for comparison
- Parameters:
index
- Index to add
dropRestriction
public void dropRestriction(java.lang.Integer dim_index)
- Drop a dimension from the comparison
- Parameters:
index
- Index to drop
addDim
public void addDim(java.lang.Integer dim_index)
- Add a dimension for comparison
- Parameters:
index
- Index to add
dropDim
public void dropDim(java.lang.Integer dim_index)
- Drop a dimension from the comparison
- Parameters:
index
- Index to drop
equals
public boolean equals(java.lang.Object obj)
- Just a way to determine if two Comparators enforce
the same ordering.
- Specified by:
equals
in interface java.util.Comparator
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- Comparator to determine if equal to