mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-25 17:36:55 +01:00
Fix the getFSTEntriesByContentIndex function
This commit is contained in:
parent
010e349af9
commit
156fcd02df
@ -130,11 +130,13 @@ 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()) {
|
||||||
|
if (e.getContentIndex() == index) {
|
||||||
return Stream.of(e);
|
return Stream.of(e);
|
||||||
}
|
}
|
||||||
|
return Stream.empty();
|
||||||
|
}
|
||||||
return getFSTEntriesByContentIndexAsStream(e, index);
|
return getFSTEntriesByContentIndexAsStream(e, index);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user