public boolean isSelected(Object cell){
  return (cell == null) ? false : cells.contains(cell);
}

public boolean isSelected ( Object cell ) { return ( cell == null ) ? false : cells . contains ( cell ) ; }
returns true if the given cell is selected .
