File tree Expand file tree Collapse file tree
src/main/java/org/glavo/nbt/tag Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ public final boolean isEmpty() {
3838 @ Contract (pure = true )
3939 public abstract int size ();
4040
41+ /// Returns a sequential stream with this array as its source.
4142 @ Contract (pure = true )
4243 public abstract BaseStream <E , ?> stream ();
4344
Original file line number Diff line number Diff line change 2020import org .jetbrains .annotations .Contract ;
2121
2222import java .io .IOException ;
23- import java .nio .Buffer ;
2423import java .nio .ByteBuffer ;
2524import java .util .*;
2625import java .util .stream .Stream ;
@@ -32,15 +31,20 @@ public final class ByteArrayTag extends ArrayTag<Byte> {
3231
3332 byte [] value ;
3433
34+ /// Creates a new ByteArrayTag with an empty name and an empty array.
3535 public ByteArrayTag () {
3636 this ("" );
3737 }
3838
39+ /// Creates a new ByteArrayTag with the given name and an empty array.
3940 public ByteArrayTag (String name ) {
4041 super (name );
4142 this .value = EMPTY ;
4243 }
4344
45+ /// Creates a new ByteArrayTag with the given name and value.
46+ ///
47+ /// The value is cloned to avoid external modifications.
4448 public ByteArrayTag (String name , byte [] value ) {
4549 super (name );
4650 this .value = value .clone ();
Original file line number Diff line number Diff line change @@ -31,15 +31,20 @@ public final class IntArrayTag extends ArrayTag<Integer> {
3131
3232 int [] value ;
3333
34+ /// Creates a new IntArrayTag with an empty name and an empty array.
3435 public IntArrayTag () {
3536 this ("" );
3637 }
3738
39+ /// Creates a new IntArrayTag with the given name and an empty array.
3840 public IntArrayTag (String name ) {
3941 super (name );
4042 this .value = EMPTY ;
4143 }
4244
45+ /// Creates a new IntArrayTag with the given name and value.
46+ ///
47+ /// The value is cloned to avoid external modifications.
4348 public IntArrayTag (String name , int [] value ) {
4449 super (name );
4550 this .value = value .clone ();
Original file line number Diff line number Diff line change @@ -33,15 +33,20 @@ public final class LongArrayTag extends ArrayTag<Long> {
3333
3434 long [] value ;
3535
36+ /// Creates a new LongArrayTag with an empty name and an empty array.
3637 public LongArrayTag () {
3738 this ("" );
3839 }
3940
41+ /// Creates a new LongArrayTag with the given name and an empty array.
4042 public LongArrayTag (String name ) {
4143 super (name );
4244 this .value = EMPTY ;
4345 }
4446
47+ /// Creates a new LongArrayTag with the given name and value.
48+ ///
49+ /// The value is cloned to avoid external modifications.
4550 public LongArrayTag (String name , long [] value ) {
4651 super (name );
4752 this .value = value .clone ();
You can’t perform that action at this time.
0 commit comments