Package net.hironico.common.utils
Class LangUtils
java.lang.Object
net.hironico.common.utils.LangUtils
Language utilities : shortcuts that make life easier.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClasses(String packageName) Finds all classes in the specified package.static booleanhasOneNull(Object... objs) Returns true if at least one of the given objects is null.static booleanisAllNotNull(Object... objs) Checks if all given objects are not null.static booleanReturns true is ALL objects are null
-
Constructor Details
-
LangUtils
public LangUtils()
-
-
Method Details
-
hasOneNull
Returns true if at least one of the given objects is null. -
isAllNull
Returns true is ALL objects are null- Parameters:
objs- objects to tests if null- Returns:
- true is all objects are null
-
isAllNotNull
Checks if all given objects are not null.- Parameters:
objs- the objects to check- Returns:
- true if all objects are not null, false otherwise
-
getClasses
public static List<Class<? extends Object>> getClasses(String packageName) throws ClassNotFoundException, IOException Finds all classes in the specified package.- Parameters:
packageName- the package name to search in- Returns:
- the list of classes found
- Throws:
ClassNotFoundException- if a class cannot be foundIOException- if an I/O error occurs
-