mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
ListItemの利用
This commit is contained in:
parent
8620a4de64
commit
311dc21a07
|
@ -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<ListItem> convertToLibraryItems(List<DocumentMeta> metas) {
|
||||
ArrayList<ListItem> 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user