Package com.spun.util
Class ObjectUtils
java.lang.Object
com.spun.util.ObjectUtils
A static class of convenience functions for Manipulating objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertInstance(Class<?>[] classes, Object object) static voidassertInstance(Class<?> clazz, Object object) static voidassertInstanceOrNull(Class<?> type, Object value) static ThrowablecaptureException(Action0 runnableBlock) static ObjectexecuteMethod(Object object, String method, Class<?>[] methodSignature, Object[] parameters) static intgenerateHashCode(Object... relevantMembers) static Stringstatic MethodgetGreatestCommonDenominator(Object[] from, String methodName) static Method[]getMethodsForObject(Object o2, String[] passedMethods) static <T> TgetRandomIndex(T[] array) static booleanisClassPresent(String className) static booleanA convenience function to check if 2 strings are equal.static booleanisEqualForMethods(Object o1, Object o2, String... methods) tests if two objects are equal for all functions passed.static booleanstatic booleanisThisInstanceOfThat(Class<?> thiz, Class<?> that) static Class<?>static voidstatic Errorstatic voidstatic <T> TthrowAsError(Function0WithException<T> code)
-
Constructor Details
-
ObjectUtils
public ObjectUtils()
-
-
Method Details
-
loadClass
-
generateHashCode
-
isEqualForMethods
tests if two objects are equal for all functions passed. -
getMethodsForObject
-
isEqual
A convenience function to check if 2 strings are equal. -
isIn
-
isThisInstanceOfThat
-
throwAsError
-
getRandomIndex
public static <T> T getRandomIndex(T[] array) -
getGreatestCommonDenominator
-
executeMethod
-
assertInstance
-
assertInstance
-
getClassName
-
assertInstanceOrNull
-
move
-
isClassPresent
-
captureException
-
throwAsError
-
throwAsError
-