return 4;
}
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
DivisionEntry entryAtRow = filtered.get(rowIndex);
switch (columnIndex) {
case 0: return entryAtRow.getPreviousDayLeaguePosition() - rowIndex+1;
case 1: return rowIndex+1;
case 2:
if (entryAtRow.getLeaguePoints() == 100) {
// Find out why getSeries is sometimes null when you have no series
int target = (entryAtRow.getSeries() == null) ? 0 : entryAtRow.getSeries().getTarget() + entryAtRow.getSeries().getTarget()-1;
int wins = (entryAtRow.getSeries() == null) ? 0 : entryAtRow.getSeries().getLosses();
int losses = (entryAtRow.getSeries() == null) ? 0 : entryAtRow.getSeries().getWins();
return String.format("%d: %dW %dL", target, wins, losses);
}
return entryAtRow.getLeaguePoints();
case 3: return entryAtRow.getPlayerOrTeamName();
}
return null;
}