public final class CompareObjectExtensions extends Object
CompareObjectExtensions provide methods for compare an object with another
given object.| Constructor and Description |
|---|
CompareObjectExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
compare(Object sourceOjbect,
Object objectToCompare)
Compares the given two objects.
|
static int |
compareTo(Object sourceOjbect,
Object objectToCompare)
Compares the given two objects and returns the result as
int. |
static int |
compareTo(Object sourceOjbect,
Object objectToCompare,
String property)
Compares the given object over the given property.
|
static Map<String,Integer> |
getCompareToResult(Object sourceOjbect,
Object objectToCompare)
Gets the compare to result.
|
public static boolean compare(Object sourceOjbect, Object objectToCompare) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
sourceOjbect - the source ojbectobjectToCompare - the object to compareIllegalAccessException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.InvocationTargetException - Thrown if the property accessor method throws an exceptionNoSuchMethodException - Thrown if a matching method is not found or if the name is "<init>"or
"<clinit>".public static int compareTo(Object sourceOjbect, Object objectToCompare) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
int.sourceOjbect - the source objectobjectToCompare - the object to compareIllegalAccessException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.InvocationTargetException - Thrown if the property accessor method throws an exceptionNoSuchMethodException - Thrown if a matching method is not found or if the name is "<init>"or
"<clinit>".public static int compareTo(Object sourceOjbect, Object objectToCompare, String property) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
sourceOjbect - the source ojbectobjectToCompare - the object to compareproperty - the propertyIllegalAccessException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.InvocationTargetException - Thrown if the property accessor method throws an exceptionNoSuchMethodException - Thrown if a matching method is not found or if the name is "<init>"or
"<clinit>".public static Map<String,Integer> getCompareToResult(Object sourceOjbect, Object objectToCompare) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
sourceOjbect - the source ojbectobjectToCompare - the object to compareIllegalAccessException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.InvocationTargetException - Thrown if the property accessor method throws an exceptionNoSuchMethodException - Thrown if a matching method is not found or if the name is "<init>"or
"<clinit>".Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.