private String getNextListIndexSuffix(Map<String, String> options, String key) {
        if (!options.containsKey(key)) {
            return "";
        } else {
            int i = 1;
            while (options.containsKey(key + "." + i)) {
                i++;
            }
            return "." + i;
        }
    }
private String getNextListIndexSuffix ( Map < String , String > options , String key ) { if ( ! options . containsKey ( key ) ) { return "" ; } else { int i = 1 ; while ( options . containsKey ( key + "." + i ) ) { i ++ ; } return "." + i ; } }
check for the next key with a suffix like ".1" which is not already set