CategorizedReal extends CategorizedLegend<Double> { public Double getFallbackValue(){ if(parameter instanceof RealLiteral){ return ((RealLiteral) parameter).getValue(null); } else { return ((Categorize2Real)parameter).getFallbackValue().getValue(null); } } CategorizedReal(RealParameter sp); @Override SeParameter getParameter(); void setParameter(RealParameter param); Double getFallbackValue(); void setFallbackValue(Double value); @Override Double get(Double d); @Override void put(Double d, Double v); @Override Double remove(Double d); @Override Double getFromLower(Double d);  }
@Test public void testGetFallback() throws Exception{ CategorizedReal cs = new CategorizedReal(getCategorize2Real()); assertTrue(cs.getFallbackValue().equals(-15.0)); cs = new CategorizedReal(new RealLiteral(16.8)); assertTrue(cs.getFallbackValue().equals(16.8)); }