Tabnine Logo
Multiset.clear
Code IndexAdd Tabnine to your IDE (free)

How to use
clear
method
in
com.google.common.collect.Multiset

Best Java code snippets using com.google.common.collect.Multiset.clear (Showing top 20 results out of 477)

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());
}
com.google.common.collectMultisetclear

Popular methods of Multiset

  • add
    Adds a number of occurrences of an element to this multiset. Note that if occurrences == 1, this met
  • count
    Returns the number of occurrences of an element in this multiset (thecount of the element). Note tha
  • elementSet
    Returns the set of distinct elements contained in this multiset. The element set is backed by the sa
  • entrySet
    Returns a view of the contents of this multiset, grouped into Multiset.Entry instances, each providi
  • remove
    Removes a number of occurrences of the specified element from this multiset. If the multiset contain
  • size
    Returns the total number of all occurrences of all elements in this multiset. Note: this method does
  • isEmpty
  • contains
    Determines whether this multiset contains the specified element.This method refines Collection#conta
  • addAll
  • setCount
    Conditionally sets the count of an element to a new value, as described in #setCount(Object,int), pr
  • iterator
    Elements that occur multiple times in the multiset will appear multiple times in this iterator, thou
  • equals
    Compares the specified object with this multiset for equality. Returns true if the given object is a
  • iterator,
  • equals,
  • containsAll,
  • hashCode,
  • removeAll,
  • toString,
  • stream,
  • forEachEntry,
  • retainAll

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now