code: private boolean add(int i, T type) {
          Set<T> types = edges.get(i);
          // If there weren't any edges to this vertex, then special case the
          // creation and return true.
          if (types == null) {
              types = new HashSet<T>();
              edges.put(i, types);
          }
          
          boolean b = types.add(type);
          if (b)
              size++;
          return b;
      }
docs: Adds an edge to the spectied set that connectes t{@code i} according to
  the given type, or returns {@code false} if the edge already existed.