Skip to content

Instantly share code, notes, and snippets.

@amatkivskiy
Last active October 22, 2016 03:45
Show Gist options
  • Save amatkivskiy/b90ded81f2849b9abff085bd73535953 to your computer and use it in GitHub Desktop.
Save amatkivskiy/b90ded81f2849b9abff085bd73535953 to your computer and use it in GitHub Desktop.
public List<Pair<Character,MediaItem>> convert(List<Character> characters) {
List<Pair<Character,MediaItem>> downloads = new ArrayList<>();
for (Character character : characters) {
if (character.getItems() == null) {
continue;
}
for (MediaItem item : character.getItems()) {
downloads.add(new Pair<>(character, item));
}
}
return downloads;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment