org.opcfoundation.ua.utils
Class ObjectUtils

java.lang.Object
  extended by org.opcfoundation.ua.utils.ObjectUtils

public class ObjectUtils
extends Object

Object utils


Constructor Summary
ObjectUtils()
           
 
Method Summary
static boolean equals(Collection<?> c1, Collection<?> c2)
          equals.
static boolean equals(Object left, Object right)
          equals.
static int hashCode(Object obj)
          hashCode.
static boolean isPrintObjectIds()
          isPrintObjectIds.
static boolean isShowByteDataAsHex()
          isShowByteDataAsHex.
static boolean isShowDataType()
          isShowDataType.
static boolean isShowFullClassName()
          isShowFullClassName.
static boolean objectEquals(Object o1, Object o2)
          Null-safe object value comparison.
static String printFields(Object o)
          printFields.
static String printFieldsDeep(Object o)
          printFieldsDeep.
static void setPrintObjectIds(boolean printObjectIds)
          Define whether the printFieldsDeep(Object) method should show the object IDs.
static void setShowByteDataAsHex(boolean showByteDataAsHex)
          Define that printFieldsDeep(Object) will use CryptoUtil.toHex(byte[]) to print the byte arrays, instead of Object.toString().
static void setShowDataType(boolean showDataType)
          Setter for the field showDataType.
static void setShowFullClassName(boolean showFullClassName)
          Define whether to show the full class name (with path) or just the SimpleName.
static String toString(Object obj)
          toString.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectUtils

public ObjectUtils()
Method Detail

isShowDataType

public static boolean isShowDataType()

isShowDataType.

Returns:
the showDataType

setShowDataType

public static void setShowDataType(boolean showDataType)

Setter for the field showDataType.

Parameters:
showDataType - the showDataType to set

isShowFullClassName

public static boolean isShowFullClassName()

isShowFullClassName.

Returns:
the showFullClassName

setShowFullClassName

public static void setShowFullClassName(boolean showFullClassName)
Define whether to show the full class name (with path) or just the SimpleName.

Parameters:
showFullClassName - the showFullClassName to set

isShowByteDataAsHex

public static boolean isShowByteDataAsHex()

isShowByteDataAsHex.

Returns:
the showByteDataAsHex

setShowByteDataAsHex

public static void setShowByteDataAsHex(boolean showByteDataAsHex)
Define that printFieldsDeep(Object) will use CryptoUtil.toHex(byte[]) to print the byte arrays, instead of Object.toString().

Parameters:
showByteDataAsHex - the showByteDataAsHex to set

isPrintObjectIds

public static boolean isPrintObjectIds()

isPrintObjectIds.

Returns:
the printObjectIds

setPrintObjectIds

public static void setPrintObjectIds(boolean printObjectIds)
Define whether the printFieldsDeep(Object) method should show the object IDs. If it does, it will not necessarily show all the field values.

Parameters:
printObjectIds - the printObjectIds to set

objectEquals

public static boolean objectEquals(Object o1,
                                   Object o2)
Null-safe object value comparison.

Parameters:
o1 - an object or null
o2 - an object or null
Returns:
true of objects are the same or both are null, otherwise false

hashCode

public static int hashCode(Object obj)

hashCode.

Parameters:
obj - a Object object.
Returns:
a int.

equals

public static boolean equals(Collection<?> c1,
                             Collection<?> c2)

equals.

Parameters:
c1 - a Collection object.
c2 - a Collection object.
Returns:
a boolean.

equals

public static boolean equals(Object left,
                             Object right)

equals.

Parameters:
left - a Object object.
right - a Object object.
Returns:
a boolean.

toString

public static String toString(Object obj)

toString.

Parameters:
obj - a Object object.
Returns:
a String object.

printFieldsDeep

public static String printFieldsDeep(Object o)

printFieldsDeep.

Parameters:
o - a Object object.
Returns:
a String object.

printFields

public static String printFields(Object o)

printFields.

Parameters:
o - a Object object.
Returns:
a String object.


Copyright © 2018. All rights reserved.