mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-22 07:59:19 +01:00
Fix the getFSTEntriesByContentIndex function
This commit is contained in:
parent
010e349af9
commit
156fcd02df
@ -130,10 +130,12 @@ public class FSTUtils {
|
|||||||
|
|
||||||
public static Stream<FSTEntry> getFSTEntriesByContentIndexAsStream(FSTEntry entry, short index) {
|
public static Stream<FSTEntry> getFSTEntriesByContentIndexAsStream(FSTEntry entry, short index) {
|
||||||
return entry.getChildren().stream()//
|
return entry.getChildren().stream()//
|
||||||
.filter(e -> e.getContentIndex() == index) //
|
|
||||||
.flatMap(e -> {
|
.flatMap(e -> {
|
||||||
if (!e.isDir()) {
|
if (!e.isDir()) {
|
||||||
return Stream.of(e);
|
if (e.getContentIndex() == index) {
|
||||||
|
return Stream.of(e);
|
||||||
|
}
|
||||||
|
return Stream.empty();
|
||||||
}
|
}
|
||||||
return getFSTEntriesByContentIndexAsStream(e, index);
|
return getFSTEntriesByContentIndexAsStream(e, index);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user