Skip to content

Commit c41d0c3

Browse files
committed
Add @contract annotations to TagLoader methods
1 parent 13fcb3a commit c41d0c3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/main/java/org/glavo/nbt/tag/TagLoader.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
public sealed interface TagLoader permits TagLoaderImpl {
3232

3333
/// Returns the default [TagLoader].
34+
@Contract(pure = true)
3435
static TagLoader getDefault() {
3536
return TagLoaderImpl.DEFAULT;
3637
}
@@ -48,14 +49,17 @@ static TagLoader.Builder newBuilder() {
4849
///
4950
/// The default value is `true`.
5051
@ApiStatus.Experimental
52+
@Contract(pure = true)
5153
boolean isAutoDecompress();
5254

5355
/// Returns the Minecraft edition of the NBT data.
5456
///
5557
/// The default edition is [MinecraftEdition#JAVA_EDITION].
58+
@Contract(pure = true)
5659
MinecraftEdition getEdition();
5760

5861
/// Loads a NBT tag from a byte array.
62+
@Contract(pure = true)
5963
Tag load(byte[] array) throws IOException;
6064

6165
/// Loads the specified NBT tag from a byte array.

0 commit comments

Comments
 (0)