/** * Creates a new Unit with the given id and empty description. Adds the new * Unit to the list of Units of this graph. * * @param id * id of the new Unit * @return Unit * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public Unit createUnit(String id) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createUnit(id, ""); }
m = (M) md.getUnit(id); if (m == null) { m = (M) md.getFactory().createUnit(id);