public boolean isBlack(String dir) throws IOException
    {
        Vector<String> black_id = new Vector<String>();
        List<String> black_edges = getBlackEdges();
        if (black_edges != null) {
            for(int i=0; i < black_edges.size(); i++) {
                String [] vals = black_edges.get(i).split("\\|");
                if (vals[0].equals(dir+"r") || vals[0].equals(dir+"f")) {
                    black_id.add(vals[1]);
                }
            }
        }
        for(String adj : Node.dirs) {
            List<String> edges = getEdges(dir+adj);
            if (edges != null) {
                for(int i=0; i < edges.size(); i++){
                    String[] vals = edges.get(i).split("!");
                    if (!black_id.contains(vals[0])) {
                        return false;
                    }
                }
            }
        }
        return true;
    }