Tools Class
Definition
Collection of static helper functions
public class Tools
- Inheritance
-
java.lang.ObjectTools
Inherited Members
Constructors
| Tools() |
Methods
| appendJsonAttribute(StringBuilder strBuilder, String name, String value, Boolean isQuoted, Boolean isLast) |
Helper function to properly craft Json string of key-value pair |
| areEqual(Object a, Object b) |
Equality check for objects that accounts for null value comparisons. If both objects are null, this will return false. Both objects must have .equals(...) implemented correctly for this method to work properly. |
| getNumberValueFromJsonObject(JsonObject jsonObject, String key) |
Helper function to get numeric value from a JsonObject |
| getValueFromJsonObject(JsonObject jsonObject, String key) |
Helper function to get a value from the given JsonObject if the key name exists |
| getValueFromJsonString(JsonString jsonString) |
Helper function to get trim the leading and trailing parenthesis from a Json string if they exists |
| getValueStringByKey(Map<String,?> map, String keyName) |
Helper function to get a value from the given Map if the key name exists |
| isNullOrEmpty(String value) |
Helper function to check if the input string is null or empty |
| isNullOrWhiteSpace(String value) |
Helper function to check if the input string is null or contains only whitespace(s) |