static public SimpleUnit factoryWithExceptions ( String name ) throws UnitException { UnitFormat format = UnitFormatManager . instance ( ) ; Unit uu = format . parse ( name ) ; //if (isDateUnit(uu)) return new DateUnit(name); if ( isTimeUnit ( uu ) ) return new TimeUnit ( name ) ; return new SimpleUnit ( uu ) ; }
Create a SimpleUnit from the given name allow Exceptions .