private Duration getDuration ( Double duration ) { Duration result = null ; if ( duration != null ) { result = Duration . getInstance ( NumberHelper . getDouble ( duration ) , TimeUnit . HOURS ) ; } return result ; }
Extracts a duration from a JAXBElement instance .