Make the code clearer (#119)

This commit is contained in:
Chen 2019-11-26 21:35:33 +08:00 committed by Gary Gregory
parent 98293b24bd
commit f08623354e

View File

@ -24,6 +24,7 @@ import java.util.Deque;
import java.util.Iterator;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import java.util.Objects;
import org.apache.commons.collections4.OrderedIterator;
@ -438,7 +439,7 @@ public class TreeList<E> extends AbstractList<E> {
return result;
}
}
if (value == null ? value == object : value.equals(object)) {
if (Objects.equals(value, object)) {
return index;
}
if (getRightSubTree() != null) {