Returns `true` if this collection contains the specified element.

@param mixed $element The element to check whether the collection contains.
@param bool $strict Whether to perform a strict type check on the value.

@return bool
333144
public function contains($element, bool $strict = true): bool
    {
        return \in_array($element, $this->data, $strict);
    }
332061
function isInline( $element )
    {
        if ( is_string( $element ) )
            $elementName = $element;
        else
            $elementName = $element->nodeName;

        $isInline = $this->Schema[$elementName]['isInline'];

        // Special workaround for custom tags.
        if ( is_array( $isInline ) && !is_string( $element ) )
        {
            $isInline = false;
            $name = $element->getAttribute( 'name' );

            if ( isset( $this->Schema['custom']['isInline'][$name] ) )
            {
                if ( $this->Schema['custom']['isInline'][$name] != 'false' )
                    $isInline = true;
            }
        }
        return $isInline;
    }
1210344
function removeElement($element)
    {
        if(get_class($element) !== $this->manager->getModel()){
            throw new InvalidArgumentException("This element is not compatible with this collection, it only support  ".$this->manager->getModel());
        }

        $key = array_search($element, $this->elements, true);

        if ($key !== false) {
            unset($this->elements[$key]);

            return true;
        }

        return false;
    }
181365
public boolean contains(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.includes(element) && upperEndpoint.includes(element);
    }
961087
public function match($value, string $field, bool $strict = false): bool
    {
        if ($strict) {
            return $value === $this->getValidator()->getValue($field, null);
        }

        return $value == $this->getValidator()->getValue($field, null);
    }
82401
public function where($key, $value, $strict = true)
    {
        return $this->filter(function ($item) use ($key, $value, $strict) {
            return $strict ? ArrayHelper::getValue($item, $key) === $value
                : ArrayHelper::getValue($item, $key) == $value;
        });
    }
1155192
public static function isEmpty($line, $strict = false)
    {
        if (!is_array($line)) {
            throw new \RuntimeException("got a string that should already have been split into an array");
        }
        $test = array_filter($line, function ($element) use ($strict) {
            return !Reader::isEmpty($element, $strict);
        });
        return empty($test);
    }
544599
public function hasIntersections(array $array, $strict = false, $returnIntersection = false)
    {
        foreach ($this->target as $element) {
            if (in_array($element, $array, $strict)) {
                return $returnIntersection ? $element : true;
            }
        }

        return false;
    }
1228602
public function search($value, bool $strict = false)
    {
        $ord = \array_search($value, $this->map, $strict);
        if ($ord !== false) {
            return ($this->enumeration)::byOrdinal($ord);
        }

        return null;
    }
558950
protected function elementIsBlock(DOMElement $element)
	{
		$style = $this->getStyle($element);
		if (preg_match('(\\bdisplay\\s*:\\s*block)i', $style))
		{
			return true;
		}
		if (preg_match('(\\bdisplay\\s*:\\s*(?:inli|no)ne)i', $style))
		{
			return false;
		}

		return ElementInspector::isBlock($element);
	}
728711
public function isEmpty($index, $strict = true)
	{
		$value = $this->get($index, null);
		$empty = null;

		if ($strict) {
			$empty = ($value == '');
		} else {
			$empty = empty($value);
		}

		return $empty;
	}
330091
public boolean contains(int element) {
    return element >= 0 && this.imported(element) && this.pos.get(Math.abs(element)) >= 0;
  }
309570
public final void contains(@NullableDecl Object element) {
    if (!Iterables.contains(actual(), element)) {
      List<Object> elementList = newArrayList(element);
      if (hasMatchingToStringPair(actual(), elementList)) {
        failWithoutActual(
            fact("expected to contain", element),
            fact("an instance of", objectToTypeName(element)),
            simpleFact("but did not"),
            fact(
                "though it did contain",
                countDuplicatesAndAddTypeInfo(
                    retainMatchingToString(actual(), elementList /* itemsToCheck */))),
            fullContents());
      } else {
        failWithActual("expected to contain", element);
      }
    }
  }
397968
public function remove($element)
    {
        $index = $this->indexOf($element);

        if ($index !== false) {
            unset($this->_items[$index]);
            $this->_items = array_values($this->_items);
            $this->_iterator = null;
            return true;
        }
        return false;
    }
1147671
public function check($element)
    {
        if (!is_scalar($element)) {
            $element = serialize($element);
        }

        $hashes = $this->hash($element);

        foreach ($hashes as $hash) {

            $offset = (int)floor($hash / 8);
            $bit = (int)($hash % 8);

            if (!(ord($this->filter[$offset]) & (2 ** $bit))) {
                return false;
            }
        }

        return true;
    }
304446
public function contains($value, bool $strict = true): bool
    {
        return in_array($value, $this->items, $strict);
    }
181035
public static boolean contains(Iterator<?> iterator, Object element) {
        if (iterator != null) {
            while (iterator.hasNext()) {
                Object candidate = iterator.next();
                if (ObjectUtils.nullSafeEquals(candidate, element)) {
                    return true;
                }
            }
        }
        return false;
    }