Skip to content

Commit 0226b2b

Browse files
committed
add single argument constructor in Quantity
1 parent 7863fbd commit 0226b2b

File tree

1 file changed

+5
-0
lines changed
  • kubernetes/src/main/java/io/kubernetes/client/custom

1 file changed

+5
-0
lines changed

kubernetes/src/main/java/io/kubernetes/client/custom/Quantity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ public Quantity(final BigDecimal number, final Format format) {
3333
this.format = format;
3434
}
3535

36+
public Quantity(final String value) {
37+
this.number = fromString(value).number;
38+
this.format = fromString(value).format;
39+
}
40+
3641
public BigDecimal getNumber() {
3742
return number;
3843
}

0 commit comments

Comments
 (0)