java.lang.Object
org.shredzone.acme4j.toolbox.JSON.Value
- Umschließende Klasse:
JSON
A single JSON value. This instance also covers
null values.
All return values are never null unless specified otherwise. For optional
parameters, use optional().
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungasArray()Returns the value asJSON.Array.byte[]asBinary()Returns the value as base64 decoded byte array.booleanReturns the value as boolean.Returns the value asDuration.Returns the value as JSON object that was Base64 URL encoded.Returns the value asIdentifier.Returns the value asInstant.intasInt()Returns the value as int.asObject()Returns the value as JSON object.Returns the value asProblem.asStatus()Returns the parsedStatus.asString()Returns the value asString.asURI()Returns the value asURI.asURL()Returns the value asURL.booleaninthashCode()booleanChecks if this value isnull.<T> Optional<T> map(Function<JSON.Value, T> mapper) Returns this value as anOptionalof the desired type, for further mapping and filtering.Returns this value.optional()Returns this value asOptional, for further mapping and filtering.
-
Methodendetails
-
isPresent
Checks if this value isnull.- Gibt zurück:
trueif this value is present,falseifnull.
-
optional
Returns this value asOptional, for further mapping and filtering.- Gibt zurück:
Optionalof this value, orOptional.empty()if this value isnull.- Siehe auch:
-
onFeature
Returns this value. If the value wasnull, anAcmeNotSupportedExceptionis thrown. This method is used for mandatory fields that are only present if a certain feature is supported by the server.- Parameter:
feature- Feature name- Gibt zurück:
- itself
-
map
Returns this value as anOptionalof the desired type, for further mapping and filtering.- Parameter:
mapper- AFunctionthat converts aJSON.Valueto the desired type- Gibt zurück:
Optionalof this value, orOptional.empty()if this value isnull.- Siehe auch:
-
asString
Returns the value asString. -
asObject
Returns the value as JSON object. -
asEncodedObject
Returns the value as JSON object that was Base64 URL encoded.- Seit:
- 2.8
-
asProblem
Returns the value asProblem.- Parameter:
baseUrl- BaseURLto resolve relative links against
-
asIdentifier
Returns the value asIdentifier.- Seit:
- 2.3
-
asArray
Returns the value asJSON.Array.Unlike the other getters, this method returns an empty array if the value is not set. Use
isPresent()to find out if the value was actually set. -
asInt
Returns the value as int. -
asBoolean
Returns the value as boolean. -
asURI
Returns the value asURI. -
asURL
Returns the value asURL. -
asInstant
Returns the value asInstant. -
asDuration
Returns the value asDuration.- Seit:
- 2.3
-
asBinary
Returns the value as base64 decoded byte array. -
asStatus
Returns the parsedStatus. -
equals
-
hashCode
-