code: public static final TimeUnit parseWorkUnits(BigInteger value)
     {
        TimeUnit result = TimeUnit.HOURS;
  
        if (value != null)
        {
           switch (value.intValue())
           {
              case 1:
              {
                 result = TimeUnit.MINUTES;
                 break;
              }
  
              case 3:
              {
                 result = TimeUnit.DAYS;
                 break;
              }
  
              case 4:
              {
                 result = TimeUnit.WEEKS;
                 break;
              }
  
              case 5:
              {
                 result = TimeUnit.MONTHS;
                 break;
              }
  
              case 7:
              {
                 result = TimeUnit.YEARS;
                 break;
              }
  
              default:
              case 2:
              {
                 result = TimeUnit.HOURS;
                 break;
              }
           }
        }
  
        return (result);
     }
docs: Parse work units.
  
  @param value work units value
  @return TimeUnit instance