private boolean isValidCell(GridPos cell){
  if (cell.col < 0 || cell.col >= columns.size())   return false;
  if (cell.row < 0 || cell.row >= getItemCount()) {
    return false;
  }
  return true;
}

private boolean isValidCell ( GridPos cell ) { if ( cell . col < 0 || cell . col >= columns . size ( ) ) return false ; if ( cell . row < 0 || cell . row >= getItemCount ( ) ) { return false ; } return true ; }
returns true if the given cell ' s x and y values are valid column and item indexes respectively .
