Class IntOrString
java.lang.Object
io.micronaut.kubernetes.client.openapi.type.IntOrString
Custom type which is a wrapper for string or integer value.
The code has been copied from the official client and modified: IntOrString
-
Constructor Summary
ConstructorsConstructorDescriptionIntOrString(int value) Creates an integer-backed value.IntOrString(String value) Creates a string-backed value. -
Method Summary
-
Constructor Details
-
IntOrString
Creates a string-backed value.- Parameters:
value- the string value
-
IntOrString
public IntOrString(int value) Creates an integer-backed value.- Parameters:
value- the integer value
-
-
Method Details
-
isInteger
public boolean isInteger()Whether this value wraps an integer.- Returns:
- true if this value wraps an integer
-
getStrValue
Gets the string value.- Returns:
- the string value
- Throws:
IllegalStateException- if this value wraps an integer
-
getIntValue
Gets the integer value.- Returns:
- the integer value
- Throws:
IllegalStateException- if this value wraps a string
-
toString
-
equals
-
hashCode
-