Exemplo n.º 1
0
 private static void addAspectDecomposition(Aspect a, HashMap<Aspect, Integer> map) {
   Integer get = map.get(a);
   if (get == null) get = 0;
   if (a.isPrimal()) {
     map.put(a, get + 1);
   } else {
     Aspect[] parents = a.getComponents();
     for (int i = 0; i < parents.length; i++) {
       addAspectDecomposition(parents[i], map);
     }
   }
 }
Exemplo n.º 2
0
 public static HashMap<Aspect, Integer> getAspectDecomposition(Aspect a) {
   HashMap<Aspect, Integer> map = new HashMap();
   addAspectDecomposition(a, map);
   return map;
 }