class Predicates {

   public static boolean isDeviceOffline(Model m, boolean hubOffline) {
      if(m == null) {
         return false;
      }
      if(!m.supports(DeviceConnectionCapability.NAMESPACE)) {
         return false;
      }
      if(hubOffline && isHubRequired(m)) {
         return true;
      }
      return Objects.equals(DeviceConnectionCapability.STATE_OFFLINE, DeviceConnectionModel.getState(m, DeviceConnectionCapability.STATE_ONLINE));
   }

   private  Predicates();

}