Gephi plugin: How do you get all neighbors of a particular node

I’m writing a plugin for Gephi and looking for a way to find all neighbors for a given node. But I do not mean the method .getNeighbors (n), which supplies all other nodes. I need a way to find only the nodes which are direct neighbors, neighbors which are only connected with one edge.

Thanks in advance