private boolean doPathExists(Object source, Object destination, Set marked) {
        boolean pathFound = false;
        marked.add(source);
        Set edgeSet = (Set)graph.get(source);
        if (edgeSet != null) {
            Iterator edgeIter = edgeSet.iterator();
            while (edgeIter.hasNext() && !pathFound) {
                Object currentNode = edgeIter.next();
                pathFound = currentNode.equals(destination);
                if (!pathFound && !marked.contains(currentNode))
                    pathFound = doPathExists(currentNode, destination, marked);
            }
        }

        return pathFound;
    }