public boolean supportsEnvironment(LifecycleState state, Environment env) { if (state != null && state.getQualifiesForEnvironment() != null) { for (Environment curEnv : state.getQualifiesForEnvironment()) { if (curEnv.equals(env)) return true; } } return false; }
public boolean supportsEnvironment(LifecycleState state, String envName) { if (state == null) return true; for (Environment env : state.getQualifiesForEnvironment()) { if (env.getName().equals(envName)) { return true; } } return false; }