if ((this.source && checkTerminal(graph, source, edge)) || (!this.source && checkTerminal(graph, target, edge))) if (!isUnlimited()) int m = getMaxValue(); boolean isValid = checkNeighbors(graph, edge, source, target);
/** * Checks the type of the given value. */ public boolean checkType(mxGraph graph, Object value, String type) { return checkType(graph, value, type, null, null); }
int max = rule.getMaxValue();
String err = multiplicities[i].check(this, edge, source, target, sourceOut, targetIn);
int max = rule.getMaxValue();
String err = multiplicities[i].check(this, edge, source, target, sourceOut, targetIn);
if ((this.source && checkTerminal(graph, source, edge)) || (!this.source && checkTerminal(graph, target, edge))) if (!isUnlimited()) int m = getMaxValue(); boolean isValid = checkNeighbors(graph, edge, source, target);
/** * Checks the type of the given value. */ public boolean checkType(mxGraph graph, Object value, String type) { return checkType(graph, value, type, null, null); }
/** * Checks the type of the given value. */ public boolean checkTerminal(mxGraph graph, Object terminal, Object edge) { Object userObject = graph.getModel().getValue(terminal); return checkType(graph, userObject, type, attr, value); }
/** * Checks the type of the given value. */ public boolean checkTerminal(mxGraph graph, Object terminal, Object edge) { Object userObject = graph.getModel().getValue(terminal); return checkType(graph, userObject, type, attr, value); }
/** * Checks the type of the given value. */ public boolean checkNeighbors(mxGraph graph, Object edge, Object source, Object target) { mxIGraphModel model = graph.getModel(); Object sourceValue = model.getValue(source); Object targetValue = model.getValue(target); boolean isValid = !validNeighborsAllowed; Iterator<String> it = validNeighbors.iterator(); while (it.hasNext()) { String tmp = it.next(); if (this.source && checkType(graph, targetValue, tmp)) { isValid = validNeighborsAllowed; break; } else if (!this.source && checkType(graph, sourceValue, tmp)) { isValid = validNeighborsAllowed; break; } } return isValid; }
/** * Checks the type of the given value. */ public boolean checkNeighbors(mxGraph graph, Object edge, Object source, Object target) { mxIGraphModel model = graph.getModel(); Object sourceValue = model.getValue(source); Object targetValue = model.getValue(target); boolean isValid = !validNeighborsAllowed; Iterator<String> it = validNeighbors.iterator(); while (it.hasNext()) { String tmp = it.next(); if (this.source && checkType(graph, targetValue, tmp)) { isValid = validNeighborsAllowed; break; } else if (!this.source && checkType(graph, sourceValue, tmp)) { isValid = validNeighborsAllowed; break; } } return isValid; }