BarBuilderNodeDescriptor implements BarBuilderDescriptor { static PeriodType getLowerBaseType(PeriodType type) { PeriodType retType = null; int idx = 0; while(idx < baseTypeSteps.size() && (retType == null || baseTypeSteps.get(idx).isLowerThan(type))) { retType = baseTypeSteps.get(idx++); } return retType; } BarBuilderNodeDescriptor(); String getNetworkName(); void setNetworkName(String name); void reloadFile(); void reloadStream(InputStream stream); static SeriesSubscription getLowerSubscription(SeriesSubscription input); String toString(); @Override Class<? extends Analytic> getAnalyticClass(); @Override void setAnalyticClass(Class<? extends Analytic> clazz); @Override int[] getConstructorArgs(); @Override void setConstructorArgs(int[] args); @Override String getOutputKey(); @Override void setOutputKey(String key); @Override Analytic instantiateAnalytic(); @Override Analytic instantiateBuilderAnalytic(); @Override String getSpecifier(); @Override NodeType getType(); @SuppressWarnings("unchecked") @Override T getConstructorArg(); @Override void setConstructorArg(T arg);  }
@Test public void testGetLowerBaseType() { PeriodType type = BarBuilderNodeDescriptor.getLowerBaseType(PeriodType.MONTH); assertEquals(PeriodType.DAY, type); type = BarBuilderNodeDescriptor.getLowerBaseType(PeriodType.DAY); assertEquals(PeriodType.MINUTE, type); type = BarBuilderNodeDescriptor.getLowerBaseType(PeriodType.MINUTE); assertEquals(PeriodType.SECOND, type); }