mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 01:44:44 -04:00
no error if an element is added to the library twice
This commit is contained in:
parent
ff80a4da28
commit
67bb079bbb
@ -98,13 +98,10 @@ public class ElementLibrary implements Iterable<ElementLibrary.ElementContainer>
|
|||||||
/**
|
/**
|
||||||
* Adds a description to the library
|
* Adds a description to the library
|
||||||
*
|
*
|
||||||
* @param description the descritpion
|
* @param description the description
|
||||||
*/
|
*/
|
||||||
public void addDescription(ElementTypeDescription description) {
|
public void addDescription(ElementTypeDescription description) {
|
||||||
String name = description.getName();
|
String name = description.getName();
|
||||||
if (map.containsKey(name))
|
|
||||||
throw new RuntimeException(Lang.get("err_duplicateElement_N", name));
|
|
||||||
|
|
||||||
map.put(name, description);
|
map.put(name, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user