@Override
public Partitions partition( PlannerContext plannerContext, ElementGraph elementGraph, Collection<FlowElement> excludes )
{
Map<ElementGraph, EnumMultiMap> annotatedSubGraphs = new LinkedHashMap<>();
ExpressionSubGraphIterator expressionIterator = new ExpressionSubGraphIterator( plannerContext, contractionGraph, expressionGraph, elementGraph, excludes );
SubGraphIterator stepIterator = wrapIterator( expressionIterator );
while( stepIterator.hasNext() )
{
ElementGraph next = stepIterator.next();
EnumMultiMap annotationMap = stepIterator.getAnnotationMap( annotations );
annotatedSubGraphs.put( next, annotationMap );
}
return new Partitions( this, elementGraph, expressionIterator.getContractedGraph(), expressionIterator.getMatches(), annotatedSubGraphs );
}