public static List<SectionItemInterface> mappingAllVideoResponseModelFrom(CourseComponent courseComponent,Filter<VideoResponseModel> filter){
  List<SectionItemInterface> items=new ArrayList<>();
  for (  HasDownloadEntry item : courseComponent.getVideos()) {
    VideoResponseModel model=mappingVideoResponseModelFrom((VideoBlockModel)item);
    if (filter == null)     items.add(model);
 else {
      if (filter.apply(model)) {
        items.add(model);
      }
    }
  }
  return items;
}

public static List < SectionItemInterface > mappingAllVideoResponseModelFrom ( CourseComponent courseComponent , Filter < VideoResponseModel > filter ) { List < SectionItemInterface > items = new ArrayList < > ( ) ; for ( HasDownloadEntry item : courseComponent . getVideos ( ) ) { VideoResponseModel model = mappingVideoResponseModelFrom ( ( VideoBlockModel ) item ) ; if ( filter == null ) items . add ( model ) ; else { if ( filter . apply ( model ) ) { items . add ( model ) ; } } } return items ; }
we map the new course outline data to old data model . todo : ideally we should update all the code to match the new data model .
