本文整理了Java中java.util.HashSet.containsAll()
方法的一些代码示例,展示了HashSet.containsAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HashSet.containsAll()
方法的具体详情如下:
包路径:java.util.HashSet
类名称:HashSet
方法名:containsAll
暂无
代码示例来源:origin: org.apache.ant/ant
@Override
public synchronized boolean containsAll(Collection<?> c) {
return set.containsAll(c);
}
代码示例来源:origin: org.mockito/mockito-core
public boolean containsAll(Collection<?> mocks) {
return backingHashSet.containsAll(asWrappedMocks(mocks));
}
代码示例来源:origin: google/j2objc
public boolean containsAll(Collection<?> mocks) {
return backingHashSet.containsAll(asWrappedMocks(mocks));
}
代码示例来源:origin: Sable/soot
public boolean addAll(PointsToSet s) {
boolean result;
if (subsets == null) {
subsets = new HashSet<PointsToSet>();
}
if (s instanceof MemoryEfficientRasUnion) {
MemoryEfficientRasUnion meru = (MemoryEfficientRasUnion) s;
if (meru.subsets == null || subsets.containsAll(meru.subsets)) {
return false;
}
result = subsets.addAll(meru.subsets);
} else {
result = subsets.add(s);
}
return result;
}
代码示例来源:origin: prestodb/presto
.addAll(right.getOutputSymbols())
.build();
checkArgument(new HashSet<>(inputSymbols).containsAll(outputSymbols), "Left and right join inputs do not contain all output symbols");
checkArgument(!isCrossJoin() || inputSymbols.size() == outputSymbols.size(), "Cross join does not support output symbols pruning or reordering");
代码示例来源:origin: spotbugs/spotbugs
@NoWarning("GC_UNRELATED_TYPES")
static boolean test2(HashSet<Integer> s, LinkedList<Integer> lst) {
return s.containsAll(lst) && lst.containsAll(s);
}
代码示例来源:origin: spotbugs/spotbugs
@ExpectWarning("GC_UNRELATED_TYPES")
static boolean test4(HashSet<Integer> s, LinkedList<String> lst) {
return s.containsAll(lst) && lst.containsAll(s);
}
代码示例来源:origin: apache/hive
addedNodes.containsAll(childOP.getParentOperators()))) {
toWalk.add(child);
addedNodes.add(child);
代码示例来源:origin: apache/drill
addedNodes.containsAll(childOP.getParentOperators()))) {
toWalk.add(child);
addedNodes.add(child);
代码示例来源:origin: spotbugs/spotbugs
@Override
public void visit(Code code) {
boolean interesting = Const.CONSTRUCTOR_NAME.equals(getMethodName()) || Const.STATIC_INITIALIZER_NAME.equals(getMethodName());
if (!interesting) {
return;
}
secondaryConstructor = false;
HashSet<XField> needToInitialize = getMethod().isStatic() ? nonnullStaticFields : nonnullFields;
if (needToInitialize.isEmpty()) {
return;
}
// initialize any variables we want to initialize for the method
super.visit(code); // make callbacks to sawOpcode for all opcodes
if (!secondaryConstructor && !initializedFields.containsAll(needToInitialize)) {
int priority = Priorities.NORMAL_PRIORITY;
if (needToInitialize.size() - initializedFields.size() == 1 && needToInitialize.size() > 1) {
priority = Priorities.HIGH_PRIORITY;
}
for (XField f : needToInitialize) {
if (initializedFields.contains(f)) {
continue;
}
BugInstance b = new BugInstance(this, "NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", priority)
.addClassAndMethod(this).addField(f);
bugReporter.reportBug(b);
}
}
initializedFields.clear();
}
代码示例来源:origin: apache/hbase
containsAll(this.configuredReadTableTimeouts.keySet())) {
LOG.error("-readTableTimeouts can only specify read timeouts for monitor targets " +
"passed via command line.");
代码示例来源:origin: fesh0r/fernflower
if (!addhd) {
List<Statement> hdsupp = handler.getNeighbours(StatEdge.TYPE_EXCEPTION, Statement.DIRECTION_BACKWARD);
addhd = (setNodes.containsAll(hdsupp) && (setNodes.size() > hdsupp.size()
|| setNodes.size() == 1)); // strict subset
代码示例来源:origin: requery/requery
@Test
public void testInsertOneToManyInsert() {
Event event = new Event();
UUID id = UUID.randomUUID();
event.setId(id);
event.setName("test");
Tag t1 = new Tag();
t1.setId(UUID.randomUUID());
Tag t2 = new Tag();
t2.setId(UUID.randomUUID());
event.getTags().add(t1);
event.getTags().add(t2);
data.insert(event);
HashSet<Tag> set = new HashSet<>(event.getTags());
assertEquals(2, set.size());
assertTrue(set.containsAll(Arrays.asList(t1, t2)));
assertSame(2, data.select(Tag.class).get().toList().size());
}
代码示例来源:origin: wildfly/wildfly
} else if (!info.allMethods.containsAll(WebResourceCollectionMetaData.ALL_HTTP_METHODS)) {
List<String> methods = new ArrayList<>(WebResourceCollectionMetaData.ALL_HTTP_METHODS);
methods.removeAll(info.allMethods);
代码示例来源:origin: neo4j-contrib/neo4j-apoc-procedures
@UserFunction
@Description("apoc.coll.containsAll(coll, values) optimized contains-all operation (using a HashSet) (returns single row or not)")
public boolean containsAll(@Name("coll") List<Object> coll, @Name("values") List<Object> values) {
if (coll == null || coll.isEmpty()) return false;
return new HashSet<>(coll).containsAll(values);
}
代码示例来源:origin: apache/accumulo
continue;
if (!srcFiles.containsAll(cloneFiles)) {
代码示例来源:origin: org.elasticsearch/elasticsearch
final List<ShardRouting> mutableShardRoutings = routingNodes.assignedShards(shardId);
assert (shards == null && mutableShardRoutings.size() == 0)
|| (shards != null && shards.size() == mutableShardRoutings.size() && shards.containsAll(mutableShardRoutings));
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-core
/**
* {@inheritDoc}
*/
public boolean containsAll(Collection c) {
return names.containsAll(c);
}
代码示例来源:origin: apache/phoenix
QueryServicesOptions.DEFAULT_ALLOW_VIEWS_ADD_NEW_CF_BASE_TABLE);
modifyHTable = canViewsAddNewCF && !existingColumnFamiliesForBaseTable(table.getPhysicalName()).containsAll(colFamiliesForPColumnsToBeAdded);
代码示例来源:origin: edu.illinois.cs.cogcomp/LBJava
/**
* Determines whether this conjunction contains all of the terms that the given conjunction
* contains.
*
* @param c The given conjunction.
* @return <code>true</code> iff this conjunction contains all of the terms that the given
* conjunction contains.
**/
public boolean containsAll(PropositionalConjunction c) {
return children.containsAll(c.children);
}
内容来源于网络,如有侵权,请联系作者删除!