boolean representation of the getNeighbors() method