src/main/java/com/mxgraph/view/mxMultiplicity.java
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.
	 */
Checks the type of the given 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;
	}
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.
Checks the type of the given value .