Package org.graphstream.graph

Examples of org.graphstream.graph.EdgeRejectedException


    // at this point edgeId is not in use and both src and dst are not null
    edge = edgeFactory.newInstance(edgeId, src, dst, directed);
    // see if the endpoints accept the edge
    if (!src.addEdgeCallback(edge)) {
      if (strictChecking)
        throw new EdgeRejectedException("Edge " + edge
            + " was rejected by node " + src);
      return null;
    }
    // note that for loop edges the callback is called only once
    if (src != dst && !dst.addEdgeCallback(edge)) {
      // the edge is accepted by src but rejected by dst
      // so we have to remove it from src
      src.removeEdgeCallback(edge);
      if (strictChecking)
        throw new EdgeRejectedException("Edge " + edge
            + " was rejected by node " + dst);
      return null;
    }

    // now we can finally add it
View Full Code Here

TOP

Related Classes of org.graphstream.graph.EdgeRejectedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.