Changeset 1570 for DCWoRMS/branches


Ignore:
Timestamp:
02/02/16 13:56:26 (9 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/TaskStats.java

    r1567 r1570  
    1111import java.util.List; 
    1212import java.util.Set; 
     13import java.util.TreeSet; 
    1314 
    1415import schedframe.resources.computing.ComputingResource; 
     
    183184        } 
    184185 
    185         public List<String> getProcessingElementsName() { 
    186                 List<String> processingElementsNames = new ArrayList<String>(); 
     186        public Set<String> getProcessingElementsName() { 
     187                Set<String> processingElementsNames = new TreeSet<String>(); 
    187188                Iterator<ComputingResource> it = processingElements.iterator(); 
    188189                while(it.hasNext()) { 
     
    190191                        processingElementsNames.add(compRes.getFullName()); 
    191192                } 
    192                 processingElementsNames.sort(new PEIdComparator()); 
    193193                return processingElementsNames; 
    194194        } 
    195195 
    196196        public Set<String> getHostName() { 
    197                 Set<String> hostNames = new HashSet<String>(); 
     197                Set<String> hostNames = new TreeSet <String>(); 
    198198                Iterator<ComputingResource> it = processingElements.iterator(); 
    199199                while(it.hasNext()) { 
     
    212212                                hostNames.add(node.getFullName()); 
    213213                } 
     214 
    214215                return hostNames; 
    215216        } 
     
    239240 
    240241} 
    241  
    242  
    243 class PEIdComparator implements Comparator<String>{ 
    244  
    245         @Override 
    246         public int compare(String o1, String o2) { 
    247                 return(o1.compareTo(o2)); 
    248         } 
    249 } 
Note: See TracChangeset for help on using the changeset viewer.