How and what do you use it for?
import java.util.List;
List neighbours = getNeighbours(1, true, null);
if (neighbours.isEmpty()) {
// do something - code here
}
for (Object o : l) {
Actor a = (Actor) o;
// do something here!
}