class CategorizedColor extends CategorizedLegend<Color> {

    @Override
    public Color get(Double d){
        if(parameter instanceof ColorLiteral){
            return Double.isInfinite(d) && d < 0 ? ((ColorLiteral) parameter).getColor(null) : null;
        } else {
            try{
                ColorParameter sp = ((Categorize2Color)parameter).get(new RealLiteral(d));
                return sp == null ? null : sp.getColor(null);
            } catch (ParameterException pe){
                throw new IllegalArgumentException("Can't process the input value: "+d, pe);
            }
        }
    }

    public  CategorizedColor(ColorParameter sp);

}