void (HashMap<String, Object> map, String option, JTextField field) { final String colonReplacement = field.getText(); if (colonReplacement != null && colonReplacement.trim().length() > 0) { map.put(option, colonReplacement); } }