Skip to content

Commit 8cc5cc4

Browse files
committed
Add documentation comments to tag constructors
1 parent 2bb010e commit 8cc5cc4

7 files changed

Lines changed: 21 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
public final class ByteTag extends ValueTag<Byte> {
2626
private byte value;
2727

28+
/// Creates a new ByteTag with an empty name and a value of `0`.
2829
public ByteTag() {
2930
this("", (byte) 0);
3031
}
3132

33+
/// Creates a new ByteTag with the given name and a value of `0`.
3234
public ByteTag(String name) {
3335
this(name, (byte) 0);
3436
}
3537

38+
/// Creates a new ByteTag with the given name and value.
3639
public ByteTag(String name, byte value) {
3740
super(name);
3841
this.value = value;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
public final class DoubleTag extends ValueTag<Double> {
2626
private double value;
2727

28+
/// Creates a new DoubleTag with an empty name and a value of `0.0`.
2829
public DoubleTag() {
2930
this("", 0.0);
3031
}
3132

33+
/// Creates a new DoubleTag with the given name and a value of `0.0`.
3234
public DoubleTag(String name) {
3335
this(name, 0.0);
3436
}
3537

38+
/// Creates a new DoubleTag with the given name and value.
3639
public DoubleTag(String name, double value) {
3740
super(name);
3841
this.value = value;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
public final class FloatTag extends ValueTag<Float> {
2626
private float value;
2727

28+
/// Creates a new FloatTag with an empty name and a value of `0.0`.
2829
public FloatTag() {
2930
this("", 0.0f);
3031
}
3132

33+
/// Creates a new FloatTag with the given name and a value of `0.0`.
3234
public FloatTag(String name) {
3335
this(name, 0.0f);
3436
}
3537

38+
/// Creates a new FloatTag with the given name and value.
3639
public FloatTag(String name, float value) {
3740
super(name);
3841
this.value = value;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
public final class IntTag extends ValueTag<Integer> {
2626
private int value;
2727

28+
/// Creates a new IntTag with an empty name and a value of `0`.
2829
public IntTag() {
2930
this("", 0);
3031
}
3132

33+
/// Creates a new IntTag with the given name and a value of `0`.
3234
public IntTag(String name) {
3335
this(name, 0);
3436
}
3537

38+
/// Creates a new IntTag with the given name and value.
3639
public IntTag(String name, int value) {
3740
super(name);
3841
this.value = value;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
public final class LongTag extends ValueTag<Long> {
2626
private long value;
2727

28+
/// Creates a new LongTag with an empty name and a value of `0`.
2829
public LongTag() {
2930
this("", 0L);
3031
}
3132

33+
/// Creates a new LongTag with the given name and a value of `0`.
3234
public LongTag(String name) {
3335
this(name, 0L);
3436
}
3537

38+
/// Creates a new LongTag with the given name and value.
3639
public LongTag(String name, long value) {
3740
super(name);
3841
this.value = value;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
public final class ShortTag extends ValueTag<Short> {
2626
private short value;
2727

28+
/// Creates a new ShortTag with an empty name and a value of `0`.
2829
public ShortTag() {
2930
this("", (short) 0);
3031
}
3132

33+
/// Creates a new ShortTag with the given name and a value of `0`.
3234
public ShortTag(String name) {
3335
this(name, (short) 0);
3436
}
3537

38+
/// Creates a new ShortTag with the given name and value.
3639
public ShortTag(String name, short value) {
3740
super(name);
3841
this.value = value;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,18 @@
2525
public final class StringTag extends ValueTag<String> {
2626
private String value;
2727

28+
/// Creates a new StringTag with an empty name and a value of `""`.
2829
public StringTag() {
2930
this("", "");
3031
}
3132

33+
/// Creates a new StringTag with the given name and a value of `""`.
3234
public StringTag(String name) {
3335
super(name);
3436
this.value = "";
3537
}
3638

39+
/// Creates a new StringTag with the given name and value.
3740
public StringTag(String name, String value) {
3841
super(name);
3942
this.value = Objects.requireNonNull(value, "value");

0 commit comments

Comments
 (0)