@Test void testIsUnitEmpty() { Unit<?> unit = Unit.valueOf(""); Unit<?> unit1 = Unit.valueOf("¹"); Unit<?> unitKg = Unit.valueOf("kg"); assertTrue(unitResolverImpl.isUnitEmpty(null)); assertTrue(unitResolverImpl.isUnitEmpty(unit)); assertTrue(unitResolverImpl.isUnitEmpty(unit1)); assertFalse(unitResolverImpl.isUnitEmpty(unitKg)); }
boolean isUnitEmpty(Unit<? extends Quantity> unit) { return unit == null || StringUtils.isBlank(unit.toString()); }
UnitResolverImpl implements UnitResolver { boolean isUnitEmpty(Unit<? extends Quantity> unit) { return unit == null || StringUtils.isBlank(unit.toString()); } }
UnitResolverImpl implements UnitResolver { boolean isUnitEmpty(Unit<? extends Quantity> unit) { return unit == null || StringUtils.isBlank(unit.toString()); } UnitResolverImpl(OntologyService ontologyService); }
UnitResolverImpl implements UnitResolver { boolean isUnitEmpty(Unit<? extends Quantity> unit) { return unit == null || StringUtils.isBlank(unit.toString()); } UnitResolverImpl(OntologyService ontologyService); @Override Unit<? extends Quantity> resolveUnit(Attribute attr); }
UnitResolverImpl implements UnitResolver { boolean isUnitEmpty(Unit<? extends Quantity> unit) { return unit == null || StringUtils.isBlank(unit.toString()); } UnitResolverImpl(OntologyService ontologyService); @Override Unit<? extends Quantity> resolveUnit(Attribute attr);  }