public class ObjectUtils extends Object
| Constructor and Description |
|---|
ObjectUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertInstance(Class<?>[] classes,
Object object) |
static void |
assertInstance(Class<?> clazz,
Object object) |
static void |
assertInstanceOrNull(Class<?> type,
Object value) |
static Throwable |
captureException(Action0 runnableBlock) |
static Object |
executeMethod(Object object,
String method,
Class<?>[] methodSignature,
Object[] parameters) |
static int |
generateHashCode(Object... relevantMembers) |
static String |
getClassName(Object o) |
static Method |
getGreatestCommonDenominator(Object[] from,
String methodName) |
static Method[] |
getMethodsForObject(Object o2,
String[] passedMethods) |
static <T> T |
getRandomIndex(T[] array) |
static boolean |
isClassPresent(String className) |
static boolean |
isEqual(Object s1,
Object s2)
A convenience function to check if 2 strings are equal.
|
static boolean |
isEqualForMethods(Object o1,
Object o2,
String... methods)
tests if two objects are equal for all functions passed.
|
static boolean |
isIn(Object target,
Object[] objects) |
static boolean |
isThisInstanceOfThat(Class<?> thiz,
Class<?> that) |
static Class<?> |
loadClass(String className) |
static void |
move(Object from,
Object to,
String[] getters) |
static void |
throwAsError(Action0WithException code) |
static <T> T |
throwAsError(Function0WithException<T> code) |
static Error |
throwAsError(Throwable t) |
public static int generateHashCode(Object... relevantMembers)
public static boolean isEqualForMethods(Object o1, Object o2, String... methods)
public static boolean isEqual(Object s1, Object s2)
public static <T> T getRandomIndex(T[] array)
public static Method getGreatestCommonDenominator(Object[] from, String methodName)
public static Object executeMethod(Object object, String method, Class<?>[] methodSignature, Object[] parameters)
public static boolean isClassPresent(String className)
public static <T> T throwAsError(Function0WithException<T> code)
public static void throwAsError(Action0WithException code)
Copyright © 2023. All rights reserved.