/** * Constructs from identifiers and a base quantity. * * @param id * The identifiers for the base unit. <code> * id.getSymbol()</code> * shall not return <code> * null</code>. * @param baseQuantity * The base quantity of the base unit. * @throws NameException * <code>id.getSymbol()</code> returned <code> * null</code>. */ protected BaseUnit(final UnitName id, final BaseQuantity baseQuantity) throws NameException { super(id); if (id.getSymbol() == null) { throw new NameException("Base unit must have symbol"); } setDimension(new UnitDimension(this)); this.baseQuantity = baseQuantity; }
/** * Constructs from identifiers and a base quantity. * * @param id * The identifiers for the base unit. <code> * id.getSymbol()</code> * shall not return <code> * null</code>. * @param baseQuantity * The base quantity of the base unit. * @throws NameException * <code>id.getSymbol()</code> returned <code> * null</code>. */ protected BaseUnit(final UnitName id, final BaseQuantity baseQuantity) throws NameException { super(id); if (id.getSymbol() == null) { throw new NameException("Base unit must have symbol"); } setDimension(new UnitDimension(this)); this.baseQuantity = baseQuantity; }