question: static Map < TargetType , List < TypeCompound > > partitionByTargetType ( Collection < TypeCompound > annos , List < TypeCompound > unmatched , TargetType ... targetTypes ) { final Map < TargetType , List < TypeCompound > > targetTypeToAnnos = new HashMap < > ( ) ; for ( TargetType targetType : targetTypes ) { targetTypeToAnnos . put ( targetType , new ArrayList < TypeCompound > ( 10 ) ) ; } for ( final TypeCompound anno : annos ) { final List < TypeCompound > annoSet = targetTypeToAnnos . get ( anno . getPosition ( ) . type ) ; if ( annoSet != null ) { annoSet . add ( anno ) ; } else if ( unmatched != null ) { unmatched . add ( anno ) ; } } return targetTypeToAnnos ; }
target:  Use a map to partition annotations with the given TargetTypes into Lists, where each target type is a key in the output map.  Any annotation that does not have one of these target types will be added to unmatched