@Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        Time time;
        
		if (rowIndex < times.size()) {
			// Get the Activity from the indicated row.
			time = times.get(rowIndex);

			// Get the appropriate field from the columnIndex
			 if (columnIndex == columnNames.indexOf(ACTIVITY_COLUMN)) {
				return time.getIdActivity();
			} else if (columnIndex == columnNames.indexOf(START_TIME_COLUMN)) {
				return time.getStartTime();
			} else if (columnIndex == columnNames.indexOf(END_TIME_COLUMN)) {
				return time.getEndTime();
			} else if (columnIndex == columnNames.indexOf(DURATION_COLUMN)) {
				return time.getDuration();
			} else if (columnIndex == columnNames.indexOf(DESCRIPTION_COLUMN)) {
				return time.getDescription();
			} else {
				return null;
			}   
		}
		return null;
    }