We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 356a8b4 commit 5f1eb3cCopy full SHA for 5f1eb3c
1 file changed
src/main/java/org/spongepowered/api/data/persistence/DataView.java
@@ -107,6 +107,15 @@ public interface DataView {
107
*/
108
Set<DataQuery> keys(boolean deep);
109
110
+ /**
111
+ * Gets a Stream containing all root keys for this {@link DataView}.
112
+ *
113
+ * @return Stream of root keys of this container
114
+ */
115
+ default Stream<String> streamRootKeys() {
116
+ return this.keys(false).stream().map(k -> k.parts().getFirst());
117
+ }
118
+
119
/**
120
* Gets a Map containing all keys and their values for this {@link DataView}.
121
*
0 commit comments