+ 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();
+ }
+ };
+
+ Function<Sone, Collection<Post>> toAllPosts = new Function<Sone, Collection<Post>>() {
+ @Override
+ public Collection<Post> apply(@Nullable Sone sone) {
+ return (sone != null) ? sone.getPosts() : Collections.<Post>emptyList();
+ }
+ };
+