private ValueUnitWrapper normalizeMolarUnit ( final double value , final String unit ) throws UnknownUnitException { Matcher matcher = mMolarUnitPattern . matcher ( unit ) ; if ( matcher . find ( ) ) { String siPrefix = matcher . group ( 1 ) ; Double convFactor = getSIFactor ( siPrefix ) ; if ( convFactor == null ) { throw new UnknownUnitException ( unit ) ; } else { double normalizedValue = convFactor * value ; return new ValueUnitWrapper ( normalizedValue , MOLAR_NORMALIZED_UNIT ) ; } } else { throw new UnknownUnitException ( unit ) ; } }
deals with normalization of measure of molarity