assertModel(); try { if(other instanceof AbstractModel) { AbstractModel abstractModel = (AbstractModel)other; if(size() == abstractModel.size()) {
/** * Adapter implementations are strongly encouraged to overwrite this method. * It is slow and semantically not correct. */ public boolean isomorphicWith(Model other) { assertModel(); try { if (other instanceof AbstractModel) { AbstractModel abstractModel = (AbstractModel) other; if (size() == abstractModel.size()) { for (Statement s : this) { if (!abstractModel.contains(s)) { log.debug("Other model does not contain " + s); return false; } } return true; } //else log.debug("Models do not have the same size"); return false; } //else log.debug("object is not an instance of ModelAdapter, it's " + other.getClass()); return false; } catch (ModelRuntimeException e) { throw new RuntimeException(e); } }