Skip to content

Commit

Permalink
Add getNumberAsShort and getNumberAsByte to JsonNumber
Browse files Browse the repository at this point in the history
To be used in umlp
  • Loading branch information
Hellwig-SE committed Oct 16, 2024
1 parent f06f797 commit c361213
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ public long getNumberAsLong() {
public void setNumber(long value) {
this.value = value + "";
}

public short getNumberAsShort() {
return Short.parseShort(value);
}

public void setNumber(short value) {
this.value = value + "";
}

public byte getNumberAsByte() {
return Byte.parseByte(value);
}

public void setNumber(byte value) {
this.value = value + "";
}

@Override
public String toString() {
Expand Down

0 comments on commit c361213

Please sign in to comment.