gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/panels/importExport/GradeItemImportSelectionStep.java
private Map<String, ProcessedGradeItem> createCommentMap(final List<ProcessedGradeItem> items) {

		final List<ProcessedGradeItem> gbItems = filterListByType(items, Type.GB_ITEM);
		final List<ProcessedGradeItem> commentItems = filterListByType(items, Type.COMMENT);

		final Map<String, ProcessedGradeItem> rval = new HashMap<>();

		//match up the gradebook items with the comment columns. comment columns have the same title.
		gbItems.forEach(gbItem -> {
			final ProcessedGradeItem commentItem = commentItems.stream().filter(item -> StringUtils.equalsIgnoreCase(item.getItemTitle(), gbItem.getItemTitle())).findFirst().orElse(null);
			rval.put(gbItem.getItemTitle(), commentItem);
		});

		return rval;
	}
/**
	 * Map a gradebook item to its comment column, if any. All gb items will have an entry, the value may be null if there are no comments.
	 * Entries are keyed on the gradebook item title.
	 * @param items
	 * @return
	 */
Map a gradebook item to its comment column, if any. All gb items will have an entry, the value may be null if there are no comments.
Entries are keyed on the gradebook item title.
@param items
@return
Map a gradebook item to its comment column if any . All gb items will have an entry the value may be null if there are no comments . Entries are keyed on the gradebook item title . @param items @return
private Map<String, ProcessedGradeItem> createCommentMap(final List<ProcessedGradeItem> items) {
		final List<ProcessedGradeItem> gbItems = filterListByType(items, Type.GB_ITEM);
		final List<ProcessedGradeItem> commentItems = filterListByType(items, Type.COMMENT);
		final Map<String, ProcessedGradeItem> rval = new HashMap<>();
		gbItems.forEach(gbItem -> {
			final ProcessedGradeItem commentItem = commentItems.stream().filter(item -> StringUtils.equalsIgnoreCase(item.getItemTitle(), gbItem.getItemTitle())).findFirst().orElse(null);
			rval.put(gbItem.getItemTitle(), commentItem);
		});
		return rval;
	}
private Map < String , ProcessedGradeItem > createCommentMap ( final List < ProcessedGradeItem > items ) { final List < ProcessedGradeItem > gbItems = filterListByType ( items , Type . GB_ITEM ) ; final List < ProcessedGradeItem > commentItems = filterListByType ( items , Type . COMMENT ) ; final Map < String , ProcessedGradeItem > rval = new HashMap < > ( ) ; gbItems . forEach ( gbItem -> { final ProcessedGradeItem commentItem = commentItems . stream ( ) . filter ( item -> StringUtils . equalsIgnoreCase ( item . getItemTitle ( ) , gbItem . getItemTitle ( ) ) ) . findFirst ( ) . orElse ( null ) ; rval . put ( gbItem . getItemTitle ( ) , commentItem ) ; } ) ; return rval ; }
Map a gradebook item to its comment column, if any.
Map a gradebook item to its comment column if any .
//match up the gradebook items with the comment columns. comment columns have the same title.