/**
    * Computing the ClassCost for a ClassInfo involves tallying up all the MethodCosts contained
    * in the class. Then an overall cost is calculated, based on the {@code CostModel} the metric
    * computer is using.
    *
    * @param clazz to compute the metric for.
    * @return classCost
    */
 public ClassCost compute(ClassInfo clazz)
 {
     IList<MethodCost> methods = new ArrayList<MethodCost>();
     foreach (MethodInfo method in clazz.GetMethods())
     {
         methods.Add(compute(method));
     }
     return new ClassCost(clazz.Name, methods);
 }