Checks that the subject does not contain duplicate elements.
162140
public final void containsNoDuplicates() {
    List<Entry<?>> duplicates = newArrayList();
    for (Multiset.Entry<?> entry : LinkedHashMultiset.create(actual()).entrySet()) {
      if (entry.getCount() > 1) {
        duplicates.add(entry);
      }
    }
    if (!duplicates.isEmpty()) {
      failWithoutActual(
          simpleFact("expected not to contain duplicates"),
          fact("but contained", duplicates),
          fullContents());
    }
  }
835898
public boolean containsDuplicateIdentities() {
        List<Identity> checkedIdentities = new LinkedList<>();
        for (Identity i : identities) {
            for (Identity i2 : checkedIdentities) {
                if (i.equals(i2))
                    return true;
            }
            checkedIdentities.add(i);
        }
        return false;
    }
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);
      }
    }
  }
1142530
def is_match(self, subject: Union[Expression, FlatTerm]) -> bool:
        
        try:
            next(self.match(subject))
        except StopIteration:
            return False
        return True
982304
public static boolean checkDuplicateElements(DMatrixSparseCSC A ) {
        A = A.copy(); // create a copy so that it doesn't modify A
        A.sortIndices(null);
        return !checkSortedFlag(A);
    }
691209
def _find_duplicates(seq):
    """"""
    seen = set()
    return [element for element in seq
            if seq.count(element) > 1
            and element not in seen and seen.add(element) is None]
890377
protected boolean isSubsetContainedIn(Set<String> selectedListItems, Set<String> distinctFacetValues) {
        boolean isPresent = false;
        for (String selectedListItem : selectedListItems) {
            isPresent = distinctFacetValues.contains(selectedListItem);
        }
        return isPresent;
    }
1285245
def contains_none_of(self, elements):
        
        for element in elements:
            self._run(unittest_case.assertNotIn, (element, self._subject))
        return ChainInspector(self._subject)
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;
    }
629861
@Override
	public boolean isSubjectValid(Subject subject) {
		// TODO Auto-generated method stub
		String encodedjwt = getJwtSSOToken(subject);
		JwtSsoTokenUtils tokenUtil = getJwtSsoTokenConsumerUtils();
		if (tokenUtil != null && encodedjwt != null) {
			return tokenUtil.isJwtValid(encodedjwt);
		}
		return false;
	}
650120
def has_any? subject, &block
      found = subjects.include? subject
      yield if found && block
      found
    end
884425
public boolean isUniqueWithExprs(Expression[] indexExprs2) {
        if (constType != UNIQUE || (indexExprs == null) || ! indexExprs.equals(indexExprs2)) {
            return false;
        }
        return true;
    }
261654
def element_value_should_not_contain(self, locator, value):
		""""""

		self._info("Verifying element '%s' value does not contain '%s'" % (locator, value))
		
		element = self._element_find(locator, True, True)
		elem_value = str(element.get_attribute('value'))
		
		if value in elem_value:
			raise AssertionError("Value '%s' was found in element '%s' while it shouldn't have" % (value, locator))
897084
static void validateValueUniquenessInScope(String qualifiedName,
      List<TypeElement> nestedElements) {
    Set<String> names = new LinkedHashSet<>();
    for (TypeElement nestedElement : nestedElements) {
      if (nestedElement instanceof EnumElement) {
        EnumElement enumElement = (EnumElement) nestedElement;
        for (EnumConstantElement constant : enumElement.constants()) {
          String name = constant.name();
          if (!names.add(name)) {
            throw new IllegalStateException(
                "Duplicate enum constant " + name + " in scope " + qualifiedName);
          }
        }
      }
    }
  }
1365985
public final void containsAnyIn(Iterable<?> expected) {
    Collection<?> actual = iterableToCollection(actual());
    for (Object item : expected) {
      if (actual.contains(item)) {
        return;
      }
    }
    if (hasMatchingToStringPair(actual, expected)) {
      failWithoutActual(
          fact("expected to contain any of", countDuplicatesAndAddTypeInfo(expected)),
          simpleFact("but did not"),
          fact(
              "though it did contain",
              countDuplicatesAndAddTypeInfo(
                  retainMatchingToString(actual(), expected /* itemsToCheck */))),
          fullContents());
    } else {
      failWithActual("expected to contain any of", expected);
    }
  }
233626
function contains( element ) {
    for( var i = 0, len = lists.length; i < len; i++ ) {
      if( lists[i].element == element ) {
        return true;
      }
    }
    return false;
  }
195777
private boolean checkMatch() {
        if (matchList == null) {
            return true;
        }
        final int matchSize = matchList.size();
        final int ancestorSize = topicIdList.size();
        final List<String> tail = topicIdList.subList(ancestorSize - matchSize, ancestorSize);
        return matchList.equals(tail);
    }