Package jodd.util

Class Util

java.lang.Object
jodd.util.Util

public class Util extends Object
Some general utilities. All methods are safe as possible and operates with as many types as possible.
  • Constructor Details

    • Util

      public Util()
  • Method Details

    • toString

      public static String toString(Object value)
      Returns string representation of an object, while checking for null.
    • length

      public static int length(Object obj)
      Returns length of the object. Returns 0 for null. Returns -1 for objects without a length.
    • containsElement

      public static boolean containsElement(Object obj, Object element)
      Returns true if first argument contains provided element. It works for strings, collections, maps and arrays. s
    • toPrettyString

      public static String toPrettyString(Object value)
      Converts object into pretty string. All arrays are iterated.