insert method

void insert(
  1. EdgeEnd e
)
override

Insert a EdgeEnd in order in the list. If there is an existing EdgeStubBundle which is parallel, the EdgeEnd is added to the bundle. Otherwise, a new EdgeEndBundle is created to contain the EdgeEnd.

Implementation

void insert(EdgeEnd e) {
  EdgeEndBundle? eb = edgeMap[e];
  if (eb == null) {
    eb = new EdgeEndBundle.withEdgeEnd(e);
    insertEdgeEnd(e, eb);
  } else {
    eb.insert(e);
  }
}