private void processActivities ( Storepoint phoenixProject ) { final AlphanumComparator comparator = new AlphanumComparator ( ) ; List < Activity > activities = phoenixProject . getActivities ( ) . getActivity ( ) ; Collections . sort ( activities , new Comparator < Activity > ( ) { @ Override public int compare ( Activity o1 , Activity o2 ) { Map < UUID , UUID > codes1 = getActivityCodes ( o1 ) ; Map < UUID , UUID > codes2 = getActivityCodes ( o2 ) ; for ( UUID code : m_codeSequence ) { UUID codeValue1 = codes1 . get ( code ) ; UUID codeValue2 = codes2 . get ( code ) ; if ( codeValue1 == null || codeValue2 == null ) { if ( codeValue1 == null && codeValue2 == null ) { continue ; } if ( codeValue1 == null ) { return - 1 ; } if ( codeValue2 == null ) { return 1 ; } } if ( ! codeValue1 . equals ( codeValue2 ) ) { Integer sequence1 = m_activityCodeSequence . get ( codeValue1 ) ; Integer sequence2 = m_activityCodeSequence . get ( codeValue2 ) ; return NumberHelper . compare ( sequence1 , sequence2 ) ; } } return comparator . compare ( o1 . getId ( ) , o2 . getId ( ) ) ; } } ) ; for ( Activity activity : activities ) { processActivity ( activity ) ; } }
Process the set of activities from the Phoenix file .