以下代码显示的错误是:无法将对象转换为整数。我不知道我还要包括什么来投射它。
private RowFilter filter(final int itemsPerPage,final int target) {
return new RowFilter() {
public boolean include(Entry entry) {
/* HERE I AM RECEIVING ERROR: Multiple markers at this line
- Type mismatch: cannot convert from Object to int
- Cannot cast from Object to int */
int ei = (int) entry.getIdentifier();
return (target * itemsPerPage <= ei && ei < target
* itemsPerPage + itemsPerPage);
}
};
}