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 ) ; }
Given a GanttProject priority value turn this into an MPXJ Priority instance .