java.util.ArrayList.containsAll()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(241)

本文整理了Java中java.util.ArrayList.containsAll()方法的一些代码示例,展示了ArrayList.containsAll()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ArrayList.containsAll()方法的具体详情如下:
包路径:java.util.ArrayList
类名称:ArrayList
方法名:containsAll

ArrayList.containsAll介绍

暂无

代码示例

代码示例来源:origin: ReactiveX/RxJava

  1. @Override
  2. public boolean containsAll(Collection<?> c) {
  3. return list.containsAll(c);
  4. }

代码示例来源:origin: redisson/redisson

  1. @Override
  2. public boolean containsAll(Collection<?> c) {
  3. return list.containsAll(c);
  4. }

代码示例来源:origin: commons-collections/commons-collections

  1. /**
  2. * Return <code>true</code> if this list contains all of the elements
  3. * in the specified Collection.
  4. *
  5. * @param collection Collection whose elements are to be checked
  6. */
  7. public boolean containsAll(Collection collection) {
  8. if (fast) {
  9. return (list.containsAll(collection));
  10. } else {
  11. synchronized (list) {
  12. return (list.containsAll(collection));
  13. }
  14. }
  15. }

代码示例来源:origin: ltsopensource/light-task-scheduler

  1. public boolean containsAll(Collection<?> c) {
  2. return list.containsAll(c);
  3. }

代码示例来源:origin: ltsopensource/light-task-scheduler

  1. public boolean containsAll(Collection<?> c) {
  2. return list.containsAll(c);
  3. }

代码示例来源:origin: Sable/soot

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public boolean containsAll(Collection c) {
  5. return worklist.containsAll(c);
  6. }

代码示例来源:origin: wildfly/wildfly

  1. /**
  2. * Return <code>true</code> if this list contains all of the elements
  3. * in the specified Collection.
  4. *
  5. * @param collection Collection whose elements are to be checked
  6. */
  7. public boolean containsAll(Collection collection) {
  8. if (fast) {
  9. return (list.containsAll(collection));
  10. } else {
  11. synchronized (list) {
  12. return (list.containsAll(collection));
  13. }
  14. }
  15. }

代码示例来源:origin: requery/requery

  1. private ArrayList<Type<?>> sortTypes() {
  2. // sort the types in table creation order to avoid referencing not created table via a
  3. // reference (could also add constraints at the end but SQLite doesn't support that)
  4. ArrayDeque<Type<?>> queue = new ArrayDeque<>(model.getTypes());
  5. ArrayList<Type<?>> sorted = new ArrayList<>();
  6. while (!queue.isEmpty()) {
  7. Type<?> type = queue.poll();
  8. if (type.isView()) {
  9. continue;
  10. }
  11. Set<Type<?>> referencing = referencedTypesOf(type);
  12. for (Type<?> referenced : referencing) {
  13. Set<Type<?>> backReferences = referencedTypesOf(referenced);
  14. if (backReferences.contains(type)) {
  15. throw new CircularReferenceException("circular reference detected between "
  16. + type.getName() + " and " + referenced.getName());
  17. }
  18. }
  19. if (referencing.isEmpty() || sorted.containsAll(referencing)) {
  20. sorted.add(type);
  21. queue.remove(type);
  22. } else {
  23. queue.offer(type); // put back
  24. }
  25. }
  26. return sorted;
  27. }

代码示例来源:origin: facebook/facebook-android-sdk

  1. Set<String> permissions = request.getPermissions();
  2. if ((currentPermissions != null) &&
  3. ((permissions == null) || currentPermissions.containsAll(permissions))) {

代码示例来源:origin: cloudfoundry/uaa

  1. if (tokenScopes.isEmpty() || !tokenScopes.containsAll(requestedScopes)) {
  2. throw new InvalidScopeException(
  3. "Unable to narrow the scope of the client authentication to " + requestedScopes + ".",

代码示例来源:origin: jankotek/mapdb

  1. if (rnd.nextBoolean()) assertIteratorExhausted(it);
  2. assertTrue(copy.containsAll(iterated));
  3. assertTrue(copy.containsAll(spliterated));

代码示例来源:origin: jankotek/mapdb

  1. assertTrue(c.containsAll(rejects));
  2. assertTrue(c.containsAll(survivors));
  3. assertTrue(survivors.containsAll(rejects));
  4. if (threwAt.get() == null) {
  5. assertEquals(n - accepts.size(), c.size());

代码示例来源:origin: jankotek/mapdb

  1. while (it.hasNext())
  2. iterated.add(it.next());
  3. assertTrue(copy.containsAll(iterated));
  4. assertTrue(copy.containsAll(spliterated));
  5. assertTrue(copy.containsAll(removed));
  6. if (s.hasCharacteristics(Spliterator.CONCURRENT)) {
  7. ArrayList iteratedAndRemoved = new ArrayList(iterated);

代码示例来源:origin: apache/geode

  1. ArrayList<String> resultList = (ArrayList) functionContext.getResult();
  2. Set<String> nonAllowedKeys = functionParameter.getKeySet();
  3. if (resultList.containsAll(nonAllowedKeys)) {
  4. return false;

代码示例来源:origin: voldemort/voldemort

  1. if(!fetchedKeysForNode.containsAll(keysForNode))
  2. return false;
  3. else

代码示例来源:origin: geotools/geotools

  1. assertTrue(realValues.containsAll(Arrays.asList(values)));
  2. assertTrue(realValues.containsAll(Arrays.asList(values)));

代码示例来源:origin: geotools/geotools

  1. assertTrue(processedFeatureIds.containsAll(guToOccurrenceMap.keySet()));

代码示例来源:origin: geotools/geotools

  1. assertTrue(nestedCpIds.containsAll(Arrays.asList(cpIds)));
  2. assertTrue(nestedGuIds.containsAll(Arrays.asList(guIds)));

代码示例来源:origin: org.drools/drools-compiler

  1. assertTrue( list.containsAll( asList( "A", "B" ) ) );
  2. list.clear();
  3. assertTrue( list.containsAll( asList( "B", "C" ) ) );
  4. list.clear();

代码示例来源:origin: org.drools/drools-compiler

  1. assertTrue( list.containsAll( asList( "A", "B" ) ) );
  2. list.clear();

相关文章