public Object[] addAllEdges(Object[] cells){
  List<Object> allCells=new ArrayList<Object>(cells.length);
  allCells.addAll(Arrays.asList(cells));
  allCells.addAll(Arrays.asList(getAllEdges(cells)));
  return allCells.toArray();
}

public Object [ ] addAllEdges ( Object [ ] cells ) { List < Object > allCells = new ArrayList < Object > ( cells . length ) ; allCells . addAll ( Arrays . asList ( cells ) ) ; allCells . addAll ( Arrays . asList ( getAllEdges ( cells ) ) ) ; return allCells . toArray ( ) ; }
returns an array with the given cells and all edges that are connected to a cell or one of its descendants .
