本文整理了Java中com.google.common.collect.Multiset.clear()
方法的一些代码示例,展示了Multiset.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Multiset.clear()
方法的具体详情如下:
包路径:com.google.common.collect.Multiset
类名称:Multiset
方法名:clear
暂无
代码示例来源:origin: google/j2objc
@Override
public void clear() {
multiset().clear();
}
代码示例来源:origin: google/guava
@Override
public void clear() {
multiset().clear();
}
}
代码示例来源:origin: google/guava
@Override
public void clear() {
multiset().clear();
}
代码示例来源:origin: google/j2objc
@Override
public void clear() {
multiset().clear();
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void clear() {
multiset().clear();
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void clear() {
multiset().clear();
}
代码示例来源:origin: google/guava
@MapFeature.Require(SUPPORTS_REMOVE)
public void testClearThroughKeys() {
multimap().keys().clear();
assertCleared();
}
代码示例来源:origin: google/guava
@CollectionSize.Require(SEVERAL)
@CollectionFeature.Require(SUPPORTS_REMOVE)
@MultisetFeature.Require(ENTRIES_ARE_VIEWS)
public void testEntryReflectsClear() {
initThreeCopies();
assertEquals(3, getMultiset().count(e0()));
Multiset.Entry<E> entry = Iterables.getOnlyElement(getMultiset().entrySet());
assertEquals(3, entry.getCount());
getMultiset().clear();
assertEquals(0, entry.getCount());
}
代码示例来源:origin: palantir/atlasdb
totalModificationsSize.set(0);
Multiset<TableReference> localWritesByTable = ImmutableMultiset.copyOf(writesByTable);
writesByTable.clear();
Set<TableReference> localClearedTables = ImmutableSet.copyOf(clearedTables);
clearedTables.clear();
代码示例来源:origin: HubSpot/Singularity
numLostTasks += taskLostReasons.count(lostTaskReason);
taskLostReasons.clear();
代码示例来源:origin: org.apache.mahout/mahout-core
@Override
public void clear() {
trainingVectors.clear();
}
}
代码示例来源:origin: com.google.enterprise.cloudsearch/google-cloudsearch-connector-sdk
public void clear() {
opWithResult.clear();
failureCounter.clear();
successCounter.clear();
latency.clear();
opCounter.clear();
}
代码示例来源:origin: com.google.collections/google-collections
public void clear() {
head = null;
tail = null;
keyCount.clear();
keyToKeyHead.clear();
keyToKeyTail.clear();
}
代码示例来源:origin: org.sonatype.sisu/sisu-guava
@Override
public void clear() {
head = null;
tail = null;
keyCount.clear();
keyToKeyHead.clear();
keyToKeyTail.clear();
}
代码示例来源:origin: com.atlassian.bundles/guava
public void clear() {
head = null;
tail = null;
keyCount.clear();
keyToKeyHead.clear();
keyToKeyTail.clear();
}
代码示例来源:origin: com.atlassian.bundles/google-collections
public void clear() {
head = null;
tail = null;
keyCount.clear();
keyToKeyHead.clear();
keyToKeyTail.clear();
}
代码示例来源:origin: protegeproject/webprotege
private void rebuild() {
activeLangs.clear();
Stopwatch stopwatch = Stopwatch.createStarted();
rootOntology.getImportsClosure().stream()
.flatMap(ont -> ont.getAxioms(ANNOTATION_ASSERTION).stream())
.filter(ActiveLanguagesManager::isLabellingAnnotation)
.forEach(this::addAxiom);
stopwatch.stop();
logger.info("{} Extracted {} languages in {} ms", projectId, activeLangs.elementSet().size(), stopwatch.elapsed(MILLISECONDS));
rebuildSortedLanguages();
logSortedLanguages();
}
代码示例来源:origin: com.google.guava/guava-testlib
@MapFeature.Require(SUPPORTS_REMOVE)
public void testClearThroughKeys() {
multimap().keys().clear();
assertCleared();
}
代码示例来源:origin: org.apache.mahout/mahout-core
/**
* Adds all of the tokens that we counted up to a vector.
*/
public void flush(double weight, Vector data) {
for (String word : counts.elementSet()) {
// weight words by log_2(tf) times whatever other weight we are given
wordEncoder.addToVector(word, weight * Math.log1p(counts.count(word)) / LOG_2, data);
}
counts.clear();
}
代码示例来源:origin: com.google.guava/guava-testlib
@CollectionSize.Require(SEVERAL)
@CollectionFeature.Require(SUPPORTS_REMOVE)
@MultisetFeature.Require(ENTRIES_ARE_VIEWS)
public void testEntryReflectsClear() {
initThreeCopies();
assertEquals(3, getMultiset().count(e0()));
Multiset.Entry<E> entry = Iterables.getOnlyElement(getMultiset().entrySet());
assertEquals(3, entry.getCount());
getMultiset().clear();
assertEquals(0, entry.getCount());
}
内容来源于网络,如有侵权,请联系作者删除!