Class LangUtil


  • public class LangUtil
    extends Object
    Utilities to support the Java language.
    • Constructor Detail

      • LangUtil

        public LangUtil()
    • Method Detail

      • emptyStringIfNull

        public static String emptyStringIfNull​(String s)
      • ifNull

        public static Object ifNull​(Object o,
                                    Object alternative)
        Useful because an expression used to generate o need only be evaluated once.
      • toPrimitiveWrapperClass

        public static Class toPrimitiveWrapperClass​(Class primitiveClass)
      • isPrimitive

        public static boolean isPrimitive​(Class c)
      • bothNullOrEqual

        public static boolean bothNullOrEqual​(Object a,
                                              Object b)
      • newInstance

        public static Object newInstance​(Class c)
      • classesAndInterfaces

        public static Collection classesAndInterfaces​(Class c)