@Override public String getDescription() { return super.getDescription()+" = "+value.getDescription(); }
private void composeSymbol(StringBuilder bldr, Symbol symbol) { bldr.append('('); if (symbol.getPrefix() != null) { bldr.append(symbol.getPrefix().getNames().get(0)); } bldr.append(symbol.getUnit().getNames().get(0)); if (symbol.getExponent() != 1) { bldr.append(" ^ "); bldr.append(symbol.getExponent()); } bldr.append(')'); }
private boolean matchesUnit(Unit unit, String text, boolean isRegex) { return matches(unit.getProperty(), text, isRegex) || matchesConcept(unit, text, isRegex); }
if (sym.startsWith(prefix.getCode())) { unit = model.getUnit(sym.substring(prefix.getCode().length())); if (unit != null && (unit.getKind() == ConceptKind.BASEUNIT || ((DefinedUnit) unit).isMetric())) { selected = prefix; break;
private boolean matchesUnit(Unit unit, String text, boolean isRegex) { return matches(unit.getProperty(), text, isRegex) || matchesConcept(unit, text, isRegex); }
if (sym.startsWith(prefix.getCode())) { unit = model.getUnit(sym.substring(prefix.getCode().length())); if (unit != null && (unit.getKind() == ConceptKind.BASEUNIT || ((DefinedUnit) unit).isMetric())) { selected = prefix; break;
private void composeSymbol(StringBuilder bldr, Symbol symbol) { bldr.append('('); if (symbol.getPrefix() != null) { bldr.append(symbol.getPrefix().getNames().get(0)); } bldr.append(symbol.getUnit().getNames().get(0)); if (symbol.getExponent() != 1) { bldr.append(" ^ "); bldr.append(symbol.getExponent()); } bldr.append(')'); }
@Override public String getDescription() { return super.getDescription()+" = "+value.getDescription(); }
private void composeSymbol(StringBuilder bldr, Symbol symbol) { if (symbol.getPrefix() != null) { bldr.append(symbol.getPrefix().getCode()); } bldr.append(symbol.getUnit().getCode()); if (symbol.getExponent() != 1) { bldr.append(symbol.getExponent()); } }
private void composeSymbol(StringBuilder bldr, Symbol symbol) { if (symbol.getPrefix() != null) { bldr.append(symbol.getPrefix().getCode()); } bldr.append(symbol.getUnit().getCode()); if (symbol.getExponent() != 1) { bldr.append(symbol.getExponent()); } }