Package de.mhus.lib.core
Class M
- java.lang.Object
-
- de.mhus.lib.core.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 Summary
Constructors Constructor Description M()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanc(Object in, boolean def)static doublec(Object in, double def)static intc(Object in, int def)Cast to default typestatic longc(Object in, long def)static Datec(Object in, Date def)static Datecdate(Object in, Date def)static doublecdouble(Object in, double def)static intcint(Object in, int def)static longclong(Object in, long def)static <T> Tl(Class<T> class1)M.l()static <T,D extends T>
Tl(Class<T> class1, Class<D> def)M.l()static <T,U>
Stringn(de.mhus.lib.basics.consts.Identifier... idents)Return a string cascading the names of the getters (without 'get' prefix).static Stringtrunc(String in, int length)Truncate the string by length characters.
-
-
-
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 truncatelength- 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
-
-