Package de.espirit.firstspirit.json
Interface JsonPair
- All Superinterfaces:
Comparable<JsonPair>,JsonElement<JsonElement<?>>,de.espirit.firstspirit.json.JsonOutput
An interface for representing a json key/value pair containing of a key and a
JsonElement.
A JsonPair can be part of a JsonObject.- Since:
- 5.2.191206
-
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetKey()This method returns the current key of the pair.@NotNull JsonElement<?>getValue()This method returns the current value of the pair.static @NotNull JsonPairof(@NotNull String key, @NotNull JsonElement<?> value) Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.espirit.firstspirit.json.JsonOutput
json, writeTo
-
Method Details
-
of
@NotNull static @NotNull JsonPair of(@NotNull @NotNull String key, @NotNull @NotNull JsonElement<?> value) -
getKey
This method returns the current key of the pair.- Returns:
- The key of the pair.
- Since:
- 5.2.191206
-
getValue
This method returns the current value of the pair.- Specified by:
getValuein interfaceJsonElement<JsonElement<?>>- Returns:
- The value of the pair.
- Since:
- 5.2.191206
-