我有课:
public class GridResponse<V> {
public void setPage(int page) {
this.page = page;
}
}
并且类实现了比较器:
public class GridComparator<GridResponse> implements Comparator<GridResponse> {
@Override
public int compare(GridResponse o1, GridResponse o2) {
o1.setPage = '1';
return 0;
}
}
GridComparator 类有什么问题,因为我无法访问 GridResponse 中的功能?为什么?