class Predicates {

   public static boolean isSupportedModel(Model m, boolean whitelisted, @Nullable ProductCatalogEntry pm) {
      if(m == null) {
         return false;
      }

      if(m.supports(SceneCapability.NAMESPACE) && isSupportedScene(m)) {
         return whitelisted;
      }

      if(!m.supports(DeviceCapability.NAMESPACE) || StringUtils.isBlank(DeviceModel.getDevtypehint(m))) {
         return false;
      }

      if(pm != null && !pm.getCanDiscover()) {
         return false;
      }

      switch(DeviceModel.getDevtypehint(m)) {
         case Constants.DeviceTypeHint.LIGHT:
         case Constants.DeviceTypeHint.SWITCH:
         case Constants.DeviceTypeHint.DIMMER:
            return true;
         case Constants.DeviceTypeHint.THERMOSTAT:
            return whitelisted;
         default:
            return false;
      }
   }

   private  Predicates();

}