Checks that the subject contains at least one of the provided objects or fails.
183685
public final void containsAnyOf(
      @NullableDecl Object first, @NullableDecl Object second, @NullableDecl Object... rest) {
    containsAnyIn(accumulate(first, second, rest));
  }
77891
def assert_contain(content)
      hc = HasContent.new(content)
      assert hc.matches?(current_dom), hc.failure_message
    end
695318
function contains(collection, target) {
	let containsTarget = false;
	collection.some((object) => {
		if (object === target) {
			containsTarget = true;
			return true;
		}
		return false;
	});
	return containsTarget;
}
1157004
protected function containsObject($subject)
    {
        if (is_object($subject)) {
            return true;
        }
        if (!is_array($subject)) {
            return false;
        }
        foreach ($subject as $value) {
            if ($this->containsObject($value)) {
                return true;
            }
        }
        return false;
    }
376527
public static <S> boolean the(S subject, Matcher<? super S> criteria) {
        return criteria.matches(subject);
    }
1045544
public boolean contains(T object) {
        synchronized (mLock) {
            if (mOriginalValues != null) {
                return mOriginalValues.contains(object);
            } else {
                return mObjects.contains(object);
            }
        }
    }
133655
public boolean contains(Object o) {
	for(T e : elemArray) {
	    if((o == e) || ((o != null) && o.equals(e))) {
		return true;
	    }
	}
	return false;
    }
140652
public boolean contains (Object value)
    {
        for (int ii = 0, nn = size(); ii < nn; ii++) {
            if (ObjectUtil.equals(value, _list[ii])) {
                return true;
            }
        }
        return false;
    }
650120
def has_any? subject, &block
      found = subjects.include? subject
      yield if found && block
      found
    end
769823
protected static boolean contains (
        EqualityComparator eqc, Object[] list, Object element)
    {
        return (-1 != indexOf(eqc, list, element));
    }
781883
@Override
	public boolean contains(Object elem) {
		if (elem == null) return false;
		if (elem instanceof Number) return contains(((Number)elem).intValue());
		return false;
	}
250855
def contains?(object)
      key, id = to_key_and_id(object)

      @graph[key].is_a?(Enumerable) ? @graph[key].include?(id) : @graph[key]
    end
830324
def contains(container, item):
    """"""

    # equality counts as containment and is usually non destructive
    if container == item:
        return True

    # testing mapping containment is usually non destructive
    if isinstance(container, abc.Mapping) and mapping_contains(container, item):
        return True

    # standard containment except special cases
    if isinstance(container, str):
        # str __contains__ includes substring match that we don't count as containment
        if strict_contains(container, item):
            return True
    else:
        try:
            if item in container:
                return True
        except Exception:
            pass

    # search matches in generic instances
    return instance_contains(container, item)
3002
def check(self, obj, value, errors):
        
        fieldname = "%s.%s" % (type(obj).__name__, self._name)

        if value is None:
            if not self._null:
                errors.append("%s may not be 'null'" % fieldname)

            # If None, just leave. The rest of checks don't make any sense.
            return

        for has_error in [self._has_wrong_type, self._has_wrong_length,
                          self._is_not_one_of, self._has_subproblems]:
            if has_error(fieldname, value, errors):
                break
1139363
function contains(value, elem) {
        if (validateHelpers.isArray(elem)) {
            for (var i = 0, len = elem.length; i < len; i += 1) {
                if (elem[i] === value) {
                    return true;
                }
            }
        }

        if (validateHelpers.isString(elem)) {
            return elem.indexOf(value) >= 0;
        }

        return false;
    }
180956
def is_relevant(self, action, subject):
        
        return self.matches_action(action) and self.matches_subject(subject)
752683
function arrayContains(array, subject) {
		// See if an array contains a particular value
		for (var i in array) {
			if (array.hasOwnProperty(i) && array[i] === subject) {
				return true;
			}
		}
		return false;
	}