{@inheritDoc}
(T object1, T object2)
| 106 | |
| 107 | /** {@inheritDoc} */ |
| 108 | @Override |
| 109 | public int compare(T object1, T object2) { |
| 110 | for (Closure closure : closures) { |
| 111 | Object value1 = closure.call(object1); |
| 112 | Object value2 = closure.call(object2); |
| 113 | int result; |
| 114 | if (!equalityCheck || (value1 instanceof Comparable && value2 instanceof Comparable)) { |
| 115 | result = numberAwareComparator.compare(value1, value2); |
| 116 | } else { |
| 117 | result = DefaultTypeTransformation.compareEqual(value1, value2) ? 0 : -1; |
| 118 | } |
| 119 | if (result == 0) continue; |
| 120 | return result; |
| 121 | } |
| 122 | return 0; |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * Indicates whether equality-only comparison is enabled for non-comparable values. |
nothing calls this directly
no test coverage detected