@@ -199,64 +199,78 @@ public boolean equals(Object obj) {
199199 && this .contentEquals (that );
200200 }
201201
202+ /// The loader for reading NBT tags.
202203 @ FunctionalInterface
203204 public interface Loader <T extends Tag , S > extends NBTLoader <T , S > {
204205
206+ /// The loader for reading NBT tags from an [InputStream].
205207 static Loader <Tag , InputStream > ofInputStream () {
206208 return TagLoader .OfInputStream .DEFAULT ;
207209 }
208210
211+ /// The loader for reading NBT tags from an [InputStream].
209212 static <T extends Tag > Loader <T , InputStream > ofInputStream (Class <T > tagClass ) {
210213 return new TagLoader .OfInputStream <>(tagClass , MinecraftEdition .JAVA_EDITION , true );
211214 }
212215
216+ /// The loader for reading NBT tags from a [ReadableByteChannel].
213217 static Loader <Tag , ReadableByteChannel > ofByteChannel () {
214218 return TagLoader .OfByteChannel .DEFAULT ;
215219 }
216220
221+ /// The loader for reading NBT tags from a [ReadableByteChannel].
217222 static <T extends Tag > Loader <T , ReadableByteChannel > ofByteChannel (Class <T > tagClass ) {
218223 return new TagLoader .OfByteChannel <>(tagClass , MinecraftEdition .JAVA_EDITION , true );
219224 }
220225
226+ /// The loader for reading NBT tags from a [Path].
221227 static Loader <Tag , Path > ofPath () {
222228 return TagLoader .OfPath .DEFAULT ;
223229 }
224230
231+ /// The loader for reading NBT tags from a [Path].
225232 static <T extends Tag > Loader <T , Path > ofPath (Class <T > tagClass ) {
226233 return new TagLoader .OfPath <>(tagClass , MinecraftEdition .JAVA_EDITION , true );
227234 }
228235
229236 @ Override
230237 T load (S source ) throws IOException ;
231238
239+ /// The builder for creating a [Loader].
232240 interface Builder <T extends Tag , S >
233241 extends NBTLoader .Builder <T , S > {
234242
243+ /// Creates a builder for creating a [Loader] for reading NBT tags from an [InputStream].
235244 @ Contract (value = "-> new" )
236245 static Builder <Tag , InputStream > ofInputStream () {
237246 return Builder .ofInputStream (Tag .class );
238247 }
239248
249+ /// Creates a builder for creating a [Loader] for reading NBT tags from an [InputStream].
240250 @ Contract (value = "_ -> new" )
241251 static <T extends Tag > Builder <T , InputStream > ofInputStream (Class <T > tagClass ) {
242252 return new TagLoader .OfInputStream .Builder <>(tagClass );
243253 }
244254
255+ /// Creates a builder for creating a [Loader] for reading NBT tags from a [ReadableByteChannel].
245256 @ Contract (value = "-> new" )
246257 static Builder <Tag , ReadableByteChannel > ofByteChannel () {
247258 return Builder .ofByteChannel (Tag .class );
248259 }
249260
261+ /// Creates a builder for creating a [Loader] for reading NBT tags from a [ReadableByteChannel].
250262 @ Contract (value = "_ -> new" )
251263 static <T extends Tag > Builder <T , ReadableByteChannel > ofByteChannel (Class <T > tagClass ) {
252264 return new TagLoader .OfByteChannel .Builder <>(tagClass );
253265 }
254266
267+ /// Creates a builder for creating a [Loader] for reading NBT tags from a [Path].
255268 @ Contract (value = "-> new" )
256269 static Builder <Tag , Path > ofPath () {
257270 return Builder .ofPath (Tag .class );
258271 }
259272
273+ /// Creates a builder for creating a [Loader] for reading NBT tags from a [Path].
260274 @ Contract (value = "_ -> new" )
261275 static <T extends Tag > Builder <T , Path > ofPath (Class <T > tagClass ) {
262276 return new TagLoader .OfPath .Builder <>(tagClass );
0 commit comments