code: private boolean containsBoth(N a, N b)
      {
          return nodes.containsKey(a) && nodes.containsKey(b);
      }
docs: Returns true if both <tt>a</tt> and <tt>b</tt> are nodes in the graph
  @param a the first value to check for
  @param b the second value to check for
  @return true if both <tt>a</tt> and <tt>b</tt> are in the graph, false otherwise