public static Duration getDuration ( ProjectProperties properties , Integer durationValue , Integer unitsValue ) { Duration result ; if ( durationValue == null ) { result = null ; } else { result = Duration . getInstance ( durationValue . intValue ( ) , TimeUnit . MINUTES ) ; TimeUnit units = getDurationUnits ( unitsValue ) ; if ( result . getUnits ( ) != units ) { result = result . convertUnits ( units , properties ) ; } } return ( result ) ; }
Convert the integer representation of a duration value and duration units into an MPXJ Duration instance .