diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryUtils.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryUtils.java new file mode 100644 index 00000000..2e4ab8ad --- /dev/null +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryUtils.java @@ -0,0 +1,22 @@ +package one.nem.lacerta.feature.library; + +import java.util.ArrayList; +import java.util.List; + +import one.nem.lacerta.model.ListItem; +import one.nem.lacerta.model.document.DocumentMeta; + +public class LibraryUtils { + + public static ArrayList convertToLibraryItems(List metas) { + ArrayList libraryItems = new ArrayList<>(); + for (DocumentMeta meta : metas) { + ListItem listItem = new ListItem(); + listItem.setTitle(meta.getTitle()); + listItem.setDescription(meta.getTitle()); + // 他の必要な情報もListItemに設定する + libraryItems.add(listItem); + } + return libraryItems; + } + }