code: @Override
      public void union(Collection<KamEdge> kamEdges) throws InvalidArgument {
          for (KamEdge kamEdge : kamEdges) {
              if (!this.getKamInfo().equals(kamEdge.getKam().getKamInfo())) {
                  throw new InvalidArgument("Edge does not belong to the KAM");
              }
  
              // See if the edge already exists
              if (!edgeIdMap.containsKey(kamEdge)) {
  
                  // Make sure the nodes are valid for this kam, if not then add them
                  if (!contains(kamEdge.getSourceNode())) {
                      addNode(kamEdge.getSourceNode());
                  }
                  if (!contains(kamEdge.getTargetNode())) {
                      addNode(kamEdge.getTargetNode());
                  }
                  // add this edge into the graph
                  addEdge(kamEdge);
              }
          }
      }
docs: {@inheritDoc}