The list of methods to do List Equal are organized into topic(s).
boolean
areEqual(final List list1, final List list2) Returns whether lists are equal or not.
if (list1 == null && list2 == null) {
return true;
} else if ((list1 == null || list2 == null) && list1 != list2) {
return false;
} else {
if (list1.size() != list2.size()) {
return false;
} else {
...
boolean
areEqual(List a, List b) are Equal
if (a == b) {
return true;
if (a == null || b == null) {
return false;
if (a.size() != b.size()) {
return false;
...
boolean
areEqual(List> list1, List> list2) are Equal
if (list1 == null)
return list2 == null;
if (list2 == null)
return false;
int size = list1.size();
if (size != list2.size()) {
return false;
for (int i = 0; i < size; i++) {
if (list1.get(i) != list2.get(i)) {
if (list1.get(i) == null || list2.get(i) == null) {
return false;
} else if (!list1.get(i).equals(list2.get(i))) {
return false;
return true;
boolean
equal(List coll, List otherColl) equal
if (coll == null && otherColl == null)
return true;
if (coll == null && otherColl != null && otherColl.size() < 1)
return true;
if (coll != null && coll.size() < 1 && otherColl == null)
return true;
if (coll != null && coll.size() > 0 && otherColl == null)
return false;
...
boolean
equal(List> objects) equals for a list of objects
int size = objects.size();
if (size < 2) {
return true;
Object object = objects.get(0);
for (int i = 1; i < size; i++) {
if (!objects.get(i).equals(object)) {
return false;
...
boolean
equalLists(List aV1, List aV2) compares two
List instances.
if ((aV1 == null) && (aV2 == null)) {
return true;
else if ((aV1 != null) && (aV2 != null)) {
if (aV1.size() != aV2.size()) {
return false;
Iterator v1Iter = aV1.iterator();
...