protected List<BlockObject> sortFullCopySourceList(List<BlockObject> fcSourceObjects){
  List<BlockObject> sortedSourceObjects=new ArrayList<BlockObject>();
  Map<String,BlockObject> fcSourcObjectsMap=new HashMap<String,BlockObject>();
  for (  BlockObject fcSourceObject : fcSourceObjects) {
    fcSourcObjectsMap.put(fcSourceObject.getLabel(),fcSourceObject);
  }
  List<String> fcSourceLabels=new ArrayList<String>(fcSourcObjectsMap.keySet());
  Collections.sort(fcSourceLabels);
  for (  String fcSourceLabel : fcSourceLabels) {
    sortedSourceObjects.add(fcSourcObjectsMap.get(fcSourceLabel));
  }
  return sortedSourceObjects;
}

protected List < BlockObject > sortFullCopySourceList ( List < BlockObject > fcSourceObjects ) { List < BlockObject > sortedSourceObjects = new ArrayList < BlockObject > ( ) ; Map < String , BlockObject > fcSourcObjectsMap = new HashMap < String , BlockObject > ( ) ; for ( BlockObject fcSourceObject : fcSourceObjects ) { fcSourcObjectsMap . put ( fcSourceObject . getLabel ( ) , fcSourceObject ) ; } List < String > fcSourceLabels = new ArrayList < String > ( fcSourcObjectsMap . keySet ( ) ) ; Collections . sort ( fcSourceLabels ) ; for ( String fcSourceLabel : fcSourceLabels ) { sortedSourceObjects . add ( fcSourcObjectsMap . get ( fcSourceLabel ) ) ; } return sortedSourceObjects ; }
sorts the passed list of full copy source objects based on the natural sort order of their labels . used to align the labels for the full copies with their sources . for example say you have a cg with two volumes foo - 1 and foo - 2 , and you then create a full copy of one of these volumes . because they are in a cg , a full copy is created for each volume in the cg . when we create the full copies with a name of bar , then we want the full copy for foo - 1 to be bar - 1 , and the full copy for foo - 2 to be bar - 2 . however , when you get the volumes in the cg , there is no guarantee of order . now there is no restriction that volumes in a cg are named like this , but often they are because often one would create multiple volumes in a cg in a single request . so , in this simple case , then the full copy names should align . we can always create a more sophisticated comparator for the sort routine if something more elaborate is desired .
