code: public Set<T> inEdges(int vertex) {
          // REMINDER: this is probably best wrapped with yet another decorator
          // class to avoid the O(n) penality of iteration over all the edges
          Set<T> edges = getAdjacencyList(vertex);
          if (edges.isEmpty())
              return Collections.<T>emptySet();
  
          Set<T> in = new HashSet<T>();
          for (T e : edges) {
              if (e.to() == vertex)
                  in.add(e);
          }
          return in;
      }
docs: {@inheritDoc}