mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-29 11:24:20 +01:00
[NUSTitle] Simplify the getFSTEntriesFlatByContents function
This commit is contained in:
parent
2f26e1d39e
commit
9b179f51a6
@ -25,6 +25,7 @@ import java.util.Map.Entry;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import de.mas.wiiu.jnus.entities.TMD;
|
import de.mas.wiiu.jnus.entities.TMD;
|
||||||
import de.mas.wiiu.jnus.entities.Ticket;
|
import de.mas.wiiu.jnus.entities.Ticket;
|
||||||
@ -58,13 +59,7 @@ public class NUSTitle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<FSTEntry> getFSTEntriesFlatByContents(List<Content> list) {
|
public List<FSTEntry> getFSTEntriesFlatByContents(List<Content> list) {
|
||||||
List<FSTEntry> entries = new ArrayList<>();
|
return list.stream().flatMap(c -> c.getEntries().stream()).collect(Collectors.toList());
|
||||||
for (Content c : list) {
|
|
||||||
for (FSTEntry f : c.getEntries()) {
|
|
||||||
entries.add(f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return entries;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FSTEntry> getAllFSTEntriesFlat() {
|
public List<FSTEntry> getAllFSTEntriesFlat() {
|
||||||
|
Loading…
Reference in New Issue
Block a user