@Test(expected = IllegalArgumentException.class) public void list_redefine() { VariableTable vars = new VariableTable(); vars.defineVariables("a=1,a=2"); }
public void defineVariables(Map<String, String> variableMap) { if (variableMap == null) { throw new IllegalArgumentException("variableMap must not be null"); } for (Map.Entry<String, String> entry : variableMap.entrySet()) { defineVariable(entry.getKey(), entry.getValue()); } }
VariableTable { public void defineVariables(Map<String, String> variableMap) { if (variableMap == null) { throw new IllegalArgumentException("variableMap must not be null"); } for (Map.Entry<String, String> entry : variableMap.entrySet()) { defineVariable(entry.getKey(), entry.getValue()); } } }
VariableTable { public void defineVariables(Map<String, String> variableMap) { if (variableMap == null) { throw new IllegalArgumentException("variableMap must not be null"); } for (Map.Entry<String, String> entry : variableMap.entrySet()) { defineVariable(entry.getKey(), entry.getValue()); } } VariableTable();  VariableTable(RedefineStrategy redefineStrategy); }
VariableTable { public void defineVariables(Map<String, String> variableMap) { if (variableMap == null) { throw new IllegalArgumentException("variableMap must not be null"); } for (Map.Entry<String, String> entry : variableMap.entrySet()) { defineVariable(entry.getKey(), entry.getValue()); } } VariableTable();  VariableTable(RedefineStrategy redefineStrategy); static String toVariable(String name); void defineVariable(String name, String replacement); void defineVariables(Map<String, String> variableMap); String toSerialString(); void defineVariables(String variableList); Map<String, String> getVariables(); String parse(String string); String parse(String string, boolean strict); static Set<String> collectVariableNames(String string); @Override String toString(); }
VariableTable { public void defineVariables(Map<String, String> variableMap) { if (variableMap == null) { throw new IllegalArgumentException("variableMap must not be null"); } for (Map.Entry<String, String> entry : variableMap.entrySet()) { defineVariable(entry.getKey(), entry.getValue()); } } VariableTable();  VariableTable(RedefineStrategy redefineStrategy); static String toVariable(String name); void defineVariable(String name, String replacement); void defineVariables(Map<String, String> variableMap); String toSerialString(); void defineVariables(String variableList); Map<String, String> getVariables(); String parse(String string); String parse(String string, boolean strict); static Set<String> collectVariableNames(String string); @Override String toString();  }