package net.pterodactylus.sone.data;
-import static com.google.common.collect.FluentIterable.from;
import static net.pterodactylus.sone.data.Album.FLATTENER;
-import static net.pterodactylus.sone.data.Album.IMAGES;
import java.util.Collection;
import java.util.Collections;
}
};
- public static final Function<Sone, List<Image>> toAllImages = new Function<Sone, List<Image>>() {
- @Override
- public List<Image> apply(@Nullable Sone sone) {
- return (sone == null) ? Collections.<Image>emptyList() :
- from(FLATTENER.apply(sone.getRootAlbum()))
- .transformAndConcat(IMAGES).toList();
- }
- };
-
/**
* Returns the identity of this Sone.
*