Class POBExtensionsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static JSONObject putIfNotNullOrEmpty(JSONObject $self, String key, String value) Extension function to add key-value only if the value is not null or empty
      final static JSONObject putIfNotEmpty(JSONObject $self, String key, JSONObject value) Extension function to add a key-value pair to a JSONObject only if the value JSONObject is not empty.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • putIfNotNullOrEmpty

         final static JSONObject putIfNotNullOrEmpty(JSONObject $self, String key, String value)

        Extension function to add key-value only if the value is not null or empty

        Parameters:
        key - The key under which the jsonValue will be added.
        value - Value to be added to the current JSONObject.
      • putIfNotEmpty

         final static JSONObject putIfNotEmpty(JSONObject $self, String key, JSONObject value)

        Extension function to add a key-value pair to a JSONObject only if the value JSONObject is not empty.

        Parameters:
        key - The key under which the value will be added.
        value - The JSONObject to be added.