Source code: org/jdaemon/era/java/AbstractJavaCube.java
1 /*
2 * AbstractJavaCube.java
3 *
4 * Copyright (C) 2002 [Author Name]
5 * This program is distributed under the terms of the Lesser GNU General Public
6 * License (v2 or later) per the included COPYING.txt file, or see www.fsf.org.
7 *
8 * Created on June 11, 2002, 5:07 PM
9 */
10
11 package org.jdaemon.era.java;
12
13 import org.jdaemon.era.*;
14
15 import java.util.Iterator;
16 import java.util.Arrays;
17 import java.util.Comparator;
18 import java.util.Set;
19
20 /** AbstractJavaCube
21 *
22 * JavaCubes delegate their getAttribute() and getComparator() methods to their descriptor
23 * object (which will be a JavaCubeDescriptor rather than a simple CubeDescriptor).
24 *
25 * This is because the data structures supporting these methods will be invariant across all
26 * cubes having the same descriptor.
27 *
28 * @author jonathan
29 */
30 public abstract class AbstractJavaCube extends AbstractCube {
31
32
33 public Object getAttribute(String attribute, Object datum) {
34 return ((JavaCubeDescriptor)getDescriptor()).getAttribute(attribute, datum);
35 }
36
37 public Comparator getComparator(String attribute) {
38 return ((JavaCubeDescriptor)getDescriptor()).getComparator(attribute);
39 }
40
41 public abstract CubeDescriptor getDescriptor();
42 public abstract Iterator iterator();
43 }