Error Gephi Plugin : I am currently trying to write a plugin for Gephi and get the following error message:

java.lang.ClassCastException: org.gephi.graph.impl.GraphStore$NodeIterableWrapper cannot be cast to org.gephi.graph.api.Node                                                                                   at org.............execute(.....java:92)



The code in which the error occured is as follows:

    Node[] nodes = graph.getNodes().toArray();
    for (Node n: nodes){
        .....
        List<Node> neighborNodes = new LinkedList<Node>();
        for(Node m: nodes){
            NodeIterable iter = graph.getNeighbors(m);
            neighborNodes.add((Node) iter);


The last line causes the error. Is it possible via NodeIterable to insert the neighbors as nodes in the list "neighborNodes" without this cast.
I'm new in writing java plugins.

Thanks in advance

    
