class CategorizedString extends CategorizedLegend<String> {

    @Override
    public String remove(Double d){
        if(d==null){
            throw new NullPointerException("The input threshold must not be null");
        }
        if(parameter instanceof StringLiteral){
            return null;
        } else {
            Categorize2String c2s = (Categorize2String) parameter;
            StringParameter ret = c2s.remove(new RealLiteral(d));
            if(ret == null){
                return null;
            } else if(c2s.getNumClasses()==1 && c2s.getFallbackValue().equals(c2s.get(0))){
                parameter = new StringLiteral(c2s.getFallbackValue().getValue(null));
            }
            if(ret instanceof StringLiteral){
                try{
                    return ret.getValue(null);
                } catch (ParameterException pe){
                    throw new IllegalStateException("We've failed at retrieved the value of a literal. " +
                            "Something is going really wrong here.");
                }
            } else {
                throw new IllegalStateException("We're not supposed to have values that are not StringLiteral in this categorize.");
            }
        }
    }

    public  CategorizedString(StringParameter sp);

}