private static TimeUnit getDurationUnits(Integer value)
   {
      TimeUnit result = null;

      if (value != null)
      {
         int index = value.intValue();
         if (index >= 0 && index < DURATION_UNITS.length)
         {
            result = DURATION_UNITS[index];
         }
      }

      if (result == null)
      {
         result = TimeUnit.DAYS;
      }

      return (result);
   }
private static TimeUnit getDurationUnits ( Integer value ) { TimeUnit result = null ; if ( value != null ) { int index = value . intValue ( ) ; if ( index >= 0 && index < DURATION_UNITS . length ) { result = DURATION_UNITS [ index ] ; } } if ( result == null ) { result = TimeUnit . DAYS ; } return ( result ) ; }
Maps a duration unit value from a recurring task record in an MPX file
to a TimeUnit instance. Defaults to days if any problems are encountered.

@param value integer duration units value
@return TimeUnit instance