public class OtherUtils extends Object
| Constructor and Description |
|---|
OtherUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
fieldEquals(Object a,
Object b)
This utility method will compare equality on all private non-static fields.
|
static int |
fieldHashCode(Object a) |
static String |
getMyHostname() |
static int |
hashCodeSeries(Object... cherrios) |
static String |
hexFormat(byte[] data) |
static boolean |
isImgPng(byte[] imgData) |
static Collection<Field> |
nullFields(Object o)
Get a set of all the fields in an object that have not been initialized.
|
static boolean |
zeroOrAllNull(Collection<?> things) |
static boolean |
zeroOrAllNull(Object... things) |
public static boolean fieldEquals(Object a, Object b) throws IllegalAccessException
caveat emptor
a - 'this' usuallyb - the other object to test equality onIllegalAccessException - if the caller of this function is unable to access the members of 'a' or 'b'public static int fieldHashCode(Object a) throws IllegalAccessException
IllegalAccessExceptionpublic static int hashCodeSeries(Object... cherrios)
public static Collection<Field> nullFields(Object o) throws IllegalAccessException
o - The object to check for null fieldsIllegalAccessException - If the security manager doesn't like you looking at private fields.public static String hexFormat(byte[] data)
public static boolean zeroOrAllNull(Object... things)
public static boolean zeroOrAllNull(Collection<?> things)
public static String getMyHostname()
public static boolean isImgPng(byte[] imgData)
Copyright © 2015. All rights reserved.