Class M


  • public class M
    extends Object
    This is a shortcut class to call methods without obfuscating the source code. For some reasons this makes sense.
    Author:
    mikehummel
    • Constructor Detail

      • M

        public M()
    • Method Detail

      • n

        public static <T,​U> String n​(de.mhus.lib.basics.consts.Identifier... idents)
        Return a string cascading the names of the getters (without 'get' prefix). and joined with underscore. This is used to create identifiers for MForm or Adb.
        Parameters:
        idents -
        Returns:
        combined name of the getters e.g. address_firstname
      • trunc

        public static String trunc​(String in,
                                   int length)
        Truncate the string by length characters.
        Parameters:
        in - String to truncate
        length - Max length
        Returns:
        Same or truncated string
      • c

        public static int c​(Object in,
                            int def)
        Cast to default type
        Parameters:
        in -
        def -
        Returns:
        Integer
      • cint

        public static int cint​(Object in,
                               int def)
      • c

        public static long c​(Object in,
                             long def)
      • clong

        public static long clong​(Object in,
                                 long def)
      • c

        public static double c​(Object in,
                               double def)
      • cdouble

        public static double cdouble​(Object in,
                                     double def)
      • c

        public static boolean c​(Object in,
                                boolean def)
      • l

        public static <T> T l​(Class<T> class1)
        M.l()
        Parameters:
        class1 -
        Returns:
        the service
      • l

        public static <T,​D extends T> T l​(Class<T> class1,
                                                Class<D> def)
        M.l()
        Parameters:
        class1 -
        def -
        Returns:
        the service