Determines if two Index objects contain the same elements.
491800
def equals(self, other):
        
        if self is other:
            return True

        if not isinstance(other, Index):
            return False

        # need to compare nans locations and make sure that they are the same
        # since nans don't compare equal this is a bit tricky
        try:
            if not isinstance(other, Float64Index):
                other = self._constructor(other)
            if (not is_dtype_equal(self.dtype, other.dtype) or
                    self.shape != other.shape):
                return False
            left, right = self._ndarray_values, other._ndarray_values
            return ((left == right) | (self._isnan & other._isnan)).all()
        except (TypeError, ValueError):
            return False
464345
protected boolean collectionsEqual(Collection a1, Collection a2) {
		if (a1 != null && a2 != null && a1.size() == a2.size()) {
			// Loop over each element and compare them using our comparator
			Iterator iterA1 = a1.iterator();
			Iterator iterA2 = a2.iterator();
			while (iterA1.hasNext()) {
				if (!equalByComparator(iterA1.next(), iterA2.next())) {
					return false;
				}
			}
		}
		else if (a1 == null && a2 == null) {
			return true;
		}
		return false;
	}
1226163
def equal(obj1, obj2):
    """"""
    Comparable.log(obj1, obj2, '==')
    equality = obj1.equality(obj2)
    Comparable.log(obj1, obj2, '==', result=equality)
    return equality
1282287
public boolean sameAs(Frame<ValueType> other) {
        if (isTop != other.isTop) {
            return false;
        }

        if (isTop && other.isTop) {
            return true;
        }

        if (isBottom != other.isBottom) {
            return false;
        }

        if (isBottom && other.isBottom) {
            return true;
        }

        if (getNumSlots() != other.getNumSlots()) {
            return false;
        }

        for (int i = 0; i < getNumSlots(); ++i) {
            if (!getValue(i).equals(other.getValue(i))) {
                return false;
            }
        }

        return true;
    }
833111
private boolean contains(final int key, final int index) {
        return (key != 0 || states[index] == FULL) && keys[index] == key;
    }
122917
function areEqual(a,b) {
	var same = true;
	$.each(a, function(i, _) {
		if (b[i] === undefined || a[i] !== b[i]) {
			same = false;
			return false;
		}
	});
	return same;
}
209968
private static int lastIndexOf(Object o, Object[] elements, int index) {
        if (o == null) {
            for (int i = index; i >= 0; i--)
                if (elements[i] == null)
                    return i;
        } else {
            for (int i = index; i >= 0; i--)
                if (o.equals(elements[i]))
                    return i;
        }
        return -1;
    }
1035904
public final static boolean objectEquals(Object a, Object b) {
        return a == null ?
                b == null ? true : false :
                    b == null ? false : a.equals(b);
    }
405749
def _check_index_in_compilations(context: BaseContext, index: str):
    """"""
    compilations = 'compilations'
    if compilations not in context.shared_data:
        return False
    return index in context.shared_data[compilations]
1169205
def contains(self, index: Union[SchemaKey, int, str]) -> bool:
        

        LOGGER.debug('SchemaCache.contains >>> index: %s', index)

        rv = None
        if isinstance(index, SchemaKey):
            rv = (index in self._schema_key2schema)
        elif isinstance(index, int) or (isinstance(index, str) and ':2:' not in index):
            rv = (int(index) in self._seq_no2schema_key)
        elif isinstance(index, str):
            rv = (schema_key(index) in self._schema_key2schema)
        else:
            rv = False

        LOGGER.debug('SchemaCache.contains <<< %s', rv)
        return rv
638302
function(item1, item2, query) {
            if (typeof item1 === 'object' && typeof item2 === 'object') {
                query = query || {};
                for (var prop in query) {
                    if (item1[prop] !== item2[prop])
                        return false;
                }
                return true;
            }
            return item1 === item2;
        }
921652
def _element_equal(x, y):
    
    if isinstance(x, _np.ndarray) or isinstance(y, _np.ndarray):
        try:
            return (abs(_np.asarray(x) - _np.asarray(y)) < 1e-5).all()
        except:
            return False
    elif isinstance(x, dict):
        return (isinstance(y, dict)
                and _element_equal(x.keys(), y.keys())
                and all(_element_equal(x[k], y[k]) for k in x.keys()))
    elif isinstance(x, float):
        return abs(x - y) < 1e-5 * (abs(x) + abs(y))
    elif isinstance(x, (list, tuple)):
        return x == y
    else:
        return bool(x == y)
1348339
def contains_at(self, x, index):
        """"""

        try:
            if is_collection(x):
                for _x in x:
                    if (_x in self.all[index]) or (_x == self.all[index]):
                        return True
                    else:
                        return False
            else:
                return (x in self.all[index])

        except IndexError:
            return False
163792
@Pure
	public static boolean propertyArraysEquals (Property<?>[] array, Property<?> [] array2) {
		if(array.length==array2.length) {
			for(int i=0; i<array.length; i++) {
				if(array[i]==null) {
					if(array2[i]!=null)
						return false;
				} else if(array2[i]==null) {
					return false;
				} else if(!array[i].getValue().equals(array2[i].getValue())) {
					return false;
				}
			}
			return true;
		}
		return false;
	}
1093655
def are_equal_elements(a_el, b_el):
    
    if a_el.tagName != b_el.tagName:
        return False
    if sorted(a_el.attributes.items()) != sorted(b_el.attributes.items()):
        return False
    if len(a_el.childNodes) != len(b_el.childNodes):
        return False
    for a_child_el, b_child_el in zip(a_el.childNodes, b_el.childNodes):
        if a_child_el.nodeType != b_child_el.nodeType:
            return False
        if (
            a_child_el.nodeType == a_child_el.TEXT_NODE
            and a_child_el.data != b_child_el.data
        ):
            return False
        if a_child_el.nodeType == a_child_el.ELEMENT_NODE and not are_equal_elements(
            a_child_el, b_child_el
        ):
            return False
    return True
696764
function simpleIntersection(array1, array2) {
  return array1
    // Remove falsy elements
    .filter(el => el)
    // Match elements belonging in the two arrays
    .filter(el => array2.indexOf(el) !== -1)
    // Remove duplicates
    .filter((el, idx, arr) => arr.indexOf(el) === idx);
}
39083
public synchronized boolean has(int index, Scriptable start) {
        Integer key = new Integer(index);
        return indexedProps.containsKey(key);
    }