com.centit.support.algorithm.GeneralAlgorithm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of centit-utils Show documentation
Show all versions of centit-utils Show documentation
java 常用工具类,作为 apache-commons的补充
package com.centit.support.algorithm;
/**
* Created by codefan on 17-9-7.
*/
@SuppressWarnings("unused")
public abstract class GeneralAlgorithm {
private GeneralAlgorithm() {
throw new IllegalAccessError("Utility class");
}
public static T nvl(T obj, T obj2){
return obj==null ? obj2 : obj;
}
public static T nvl2(Object obj, T obj2, T obj3){
return obj==null ? obj3 : obj2;
}
}