code: private Priority getPriority(Integer gpPriority)
     {
        int result;
        if (gpPriority == null)
        {
           result = Priority.MEDIUM;
        }
        else
        {
           int index = gpPriority.intValue();
           if (index < 0 || index >= PRIORITY.length)
           {
              result = Priority.MEDIUM;
           }
           else
           {
              result = PRIORITY[index];
           }
        }
        return Priority.getInstance(result);
     }
docs: Given a GanttProject priority value, turn this into an MPXJ Priority instance.
  
  @param gpPriority GanttProject priority
  @return Priority instance