private static void createFlattenedListFromMap(List<Distributable> blockInfos,List<NodeBlockRelation> flattenedList,Set<Distributable> uniqueBlocks,Set<String> nodeList){
  for (  Distributable blockInfo : blockInfos) {
    uniqueBlocks.add(blockInfo);
    for (    String eachNode : blockInfo.getLocations()) {
      NodeBlockRelation nbr=new NodeBlockRelation(blockInfo,eachNode);
      flattenedList.add(nbr);
      nodeList.add(eachNode);
    }
  }
}

private static void createFlattenedListFromMap ( List < Distributable > blockInfos , List < NodeBlockRelation > flattenedList , Set < Distributable > uniqueBlocks , Set < String > nodeList ) { for ( Distributable blockInfo : blockInfos ) { uniqueBlocks . add ( blockInfo ) ; for ( String eachNode : blockInfo . getLocations ( ) ) { NodeBlockRelation nbr = new NodeBlockRelation ( blockInfo , eachNode ) ; flattenedList . add ( nbr ) ; nodeList . add ( eachNode ) ; } } }
create the flat list i . e flattening of the map .
