code: public Set<T> types() {
          // NOTE: purely unoptimized!
          Set<T> types = new HashSet<T>();
          for (Object o : edges.values()) {
              Set<T> s = (Set<T>)o;
              types.addAll(s);
          }
          return types;
      }
docs: Returns the set of types contained within this set