Class GSONUtils
java.lang.Object
com.ticxo.modelengine.api.utils.data.GSONUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
static <T> T
get
(com.google.gson.JsonElement element, String key, Function<com.google.gson.JsonElement, T> func, T def) static void
ifArray
(com.google.gson.JsonElement element, String key, BiConsumer<Integer, com.google.gson.JsonElement> forEach) static void
ifArray
(com.google.gson.JsonElement element, String key, Consumer<com.google.gson.JsonElement> forEach) static void
ifPresent
(com.google.gson.JsonElement element, String key, Consumer<com.google.gson.JsonElement> consumer)
-
Constructor Details
-
GSONUtils
public GSONUtils()
-
-
Method Details
-
ifPresent
-
ifArray
-
ifArray
public static void ifArray(com.google.gson.JsonElement element, String key, BiConsumer<Integer, com.google.gson.JsonElement> forEach) -
get
-
get
-