Package jodd.util
Class Util
java.lang.Object
jodd.util.Util
Some general utilities.
All methods are safe as possible and operates with as many types as possible.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsElement(Object obj, Object element) Returnstrueif first argument contains provided element.static intReturns length of the object.static StringtoPrettyString(Object value) Converts object into pretty string.static StringReturns string representation of an object, while checking fornull.
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
toString
Returns string representation of an object, while checking fornull. -
length
Returns length of the object. Returns0fornull. Returns-1for objects without a length. -
containsElement
Returnstrueif first argument contains provided element. It works for strings, collections, maps and arrays. s -
toPrettyString
Converts object into pretty string. All arrays are iterated.
-