StarTreeQueryImpl implements StarTreeQuery { @Override public Set<String> getStarDimensionNames() { Set<String> starDimensions = new HashSet<String>(); for (int i = 0; i < config.getDimensions().size(); i++) { if (StarTreeConstants.STAR.equals(dimensionKey.getDimensionValues()[i])) { starDimensions.add(config.getDimensions().get(i).getName()); } } return starDimensions; } StarTreeQueryImpl(StarTreeConfig config,
                           DimensionKey dimensionKey,
                           TimeRange timeRange); @Override Set<String> getStarDimensionNames(); @Override DimensionKey getDimensionKey(); @Override TimeRange getTimeRange(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testGetStarDimensionNames() throws Exception { StarTreeQuery query = new StarTreeQueryImpl.Builder() .setDimensionKey(getDimensionKey("*", "B0", "*")) .build(config); Assert.assertEquals(query.getStarDimensionNames(), new HashSet<String>(Arrays.asList("A", "C"))); }