From 311dc21a0749286b8cad544f7713e81b17d94560 Mon Sep 17 00:00:00 2001 From: nero Date: Mon, 15 Jan 2024 16:31:43 +0900 Subject: [PATCH] =?UTF-8?q?ListItem=E3=81=AE=E5=88=A9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/feature/library/LibraryUtils.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryUtils.java 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; + } + }