public String[] getAdjacentNodes() {
        String [] mas = new String[adjacentNodes.size()];
        int i = 0;
        for(Node node: adjacentNodes)
        {
           mas[i] = node.getNode();
            i++;
        }
                 return mas;
//        return adjacentNodes.//.toArray(new String[adjacentNodes.size()]);
    }