예제 #1
0
 public static void performAction(Action action) {
   for (Metrics metric : values()) {
     if (metric.isActive()) {
       action.perform(metric);
     }
   }
 }
예제 #2
0
  public static int amountActive() {
    int amount = 0;

    for (Metrics metric : values()) {
      if (metric.isActive()) {
        amount++;
      }
    }

    return amount;
  }