Minor formatting.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1437016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-01-22 16:07:33 +00:00
parent 5011f8cabd
commit e1bd0cbfb5
1 changed files with 5 additions and 7 deletions

View File

@ -261,9 +261,7 @@ public class ComparatorChain<E> implements Comparator<E>, Serializable {
* @param o1 the first object to compare
* @param o2 the second object to compare
* @return -1, 0, or 1
* @exception UnsupportedOperationException
* if the ComparatorChain does not contain at least one
* Comparator
* @throws UnsupportedOperationException if the ComparatorChain does not contain at least one Comparator
*/
public int compare(final E o1, final E o2) throws UnsupportedOperationException {
if (isLocked == false) {
@ -280,7 +278,7 @@ public class ComparatorChain<E> implements Comparator<E>, Serializable {
if (retval != 0) {
// invert the order if it is a reverse sort
if (orderingBits.get(comparatorIndex) == true) {
if(Integer.MIN_VALUE == retval) {
if (Integer.MIN_VALUE == retval) {
retval = Integer.MAX_VALUE;
} else {
retval *= -1;
@ -340,9 +338,9 @@ public class ComparatorChain<E> implements Comparator<E>, Serializable {
}
if (object.getClass().equals(this.getClass())) {
final ComparatorChain<?> chain = (ComparatorChain<?>) object;
return (null == orderingBits ? null == chain.orderingBits : orderingBits
.equals(chain.orderingBits)) && (null == comparatorChain ? null == chain.comparatorChain
: comparatorChain.equals(chain.comparatorChain));
return (null == orderingBits ? null == chain.orderingBits : orderingBits.equals(chain.orderingBits)) &&
(null == comparatorChain ? null == chain.comparatorChain :
comparatorChain.equals(chain.comparatorChain));
}
return false;
}