/** Method that calculates bit set (flags) of all features that are enabled by default. */ public static int collectDefaults() { int flags = 0; for (Feature f : values()) { if (f.enabledByDefault()) { flags |= f.getMask(); } } return flags; }
public static int collectDefaults() { int i = 0; Feature[] arrayOfFeature = values(); int j = arrayOfFeature.length; int k = 0; while (k < j) { Feature localFeature = arrayOfFeature[k]; if (localFeature.enabledByDefault()) { int m = localFeature.getMask(); i |= m; } k += 1; } return i; }