for (final Clause clause : iterable(propertyNames)) {
final Comparable<T> propertyValue = (Comparable<T>) clause.getValueOf(p);
final Comparable<T> propertyValue2 = (Comparable<T>) clause.getValueOf(q);
chain = chain.compare(propertyValue, propertyValue2, clause.getDirection().getOrdering());
}
return chain.result();
}
public static String toString(Object p, String propertyNames) {
return new ObjectContracts().toStringOf(p, propertyNames);