/** * Returns the hashCode for the object using the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! * @param propertyNames - the property name or names, CSV format. If multiple properties, use the {@link #hashCode(Object, String...)} varargs} overloaded version of this method. */ @Deprecated public static int hashCode(Object obj, String propertyNames) { final Iterable<String> propertyNamesIter = csvToIterable(propertyNames); return hashCode(obj, propertyNamesIter); }
/** * Evaluates which of p and q is first. * * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! * @param propertyNames - the property name or names, CSV format. If multiple properties, use the {@link #compare(Object, Object, String...) varargs} overloaded version of this method. */ @Deprecated @SuppressWarnings("unchecked") public static <T> int compare(final T p, final T q, final String propertyNames) { final Iterable<String> propertyNamesIter = csvToIterable(propertyNames); return compare(p, q, propertyNamesIter); }
/** * Returns a string representation of two objects, considering just the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! * @param propertyNames - the property name or names, CSV format. If multiple properties, use the {@link #toString(Object, String...)} varargs} overloaded version of this method. */ @Deprecated public String toStringOf(Object p, String propertyNames) { final Iterable<String> propertyNamesIter = csvToIterable(propertyNames); return toStringOf(p, propertyNamesIter); }
/** * Returns whether two objects are equal, considering just the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! * @param propertyNames - the property name or names, CSV format. If multiple properties, use the {@link #equals(Object, Object, String...)} varargs} overloaded version of this method. */ @Deprecated public static boolean equals(Object p, Object q, String propertyNames) { if(p==null && q==null) { return true; } if(p==null || q==null) { return false; } if(p.getClass() != q.getClass()) { return false; } final Iterable<String> propertyNamesIter = csvToIterable(propertyNames); return equals(p, q, propertyNamesIter); }