question: static public List < ExportMask > sortMasksByEligibility ( Map < ExportMask , ExportMaskPolicy > maskMap , ExportGroup exportGroup ) { List < ExportMaskComparatorContainer > exportMaskContainerList = new ArrayList < ExportMaskComparatorContainer > ( ) ; for ( Map . Entry < ExportMask , ExportMaskPolicy > entry : maskMap . entrySet ( ) ) { exportMaskContainerList . add ( new ExportMaskComparatorContainer ( entry . getKey ( ) , entry . getValue ( ) , exportGroup ) ) ; } Collections . sort ( exportMaskContainerList , new ExportMaskComparator ( ) ) ; List < ExportMask > sortedMasks = new ArrayList < ExportMask > ( ) ; for ( ExportMaskComparatorContainer container : exportMaskContainerList ) { ExportMaskPolicy policy = container . policy ; ExportMask mask = container . mask ; _log . info ( String . format ( "Sorted ExportMasks by eligibility: %s { isSimple:%s, igType:%s, xpType:%s, localAutoTier:%s, autoTiers:%s }" , mask . getMaskName ( ) , policy . isSimpleMask ( ) , policy . getIgType ( ) , policy . getExportType ( ) , policy . localTierPolicy , CommonTransformerFunctions . collectionToString ( policy . getTierPolicies ( ) ) ) ) ; sortedMasks . add ( container . mask ) ; } return sortedMasks ; }
target:  Sorts export masks by eligibility. For instance, less utilized export masks will be listed before more utilized ones.