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

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

    return amount;
  }