Guava TreeMultimap - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava TreeMultimap class.

This code example shows how to use the following methods:put, putAll
    /** 
     * Initializes the exclusion set. 
     */ 
    static { 
        // iPOJO Annotations 
        EXCLUSIONS.put("org.apache.felix", "org.apache.felix.ipojo.annotations");
 
        // OSGi 
        EXCLUSIONS.putAll("org.osgi", ImmutableList.of("org.osgi.core", "osgi_R4_core", "osgi_R4_compendium", "core"));
        EXCLUSIONS.put("org.apache.felix", "org.osgi.core");
 
        // SLF4J 
        EXCLUSIONS.putAll("org.slf4j", ImmutableList.of("slf4j-api", "slf4j-jcl", "slf4j-nop"));
 
        // STAX 
        EXCLUSIONS.put("stax", "stax-api");
        EXCLUSIONS.put("javax.xml.stream", "stax-api");
        EXCLUSIONS.put("org.codehaus.woodstox", "stax2-api");
    } 
 

6
CodeRank
This code example shows how to use the following methods:get
    public Collection<String> getClassNames() {
        return classNames; 
    } 
 
    public Collection<String> getFieldNames(String className) {
        return fieldsByClassNames.get(className);
    } 
 
    public String getFieldType(String className, String fieldName) {
        return fieldTypesByClassAndFieldNames.get(className + "." + fieldName);
    } 
 
    public Collection<String> getMissingClasses() {
        return missingClasses; 
    } 
 
    private static Collection<String> getIgnoredFields() {
        Collection<String> fields = new ArrayList<String>();
 
        fields.add("toString"); 
5
CodeRank
This code example shows how to use the following methods:get, keySet
 
  @Test
  public void testFuzzyMatching() { 
    TreeMultimap<Integer, String> matches = _service.getBestRunIdsForFuzzyId("0102-5");
     
    Integer bestFuzzyDistance = matches.keySet().first();
    Set<String> fuzzyMatches = matches.get(bestFuzzyDistance);
     
    assertTrue("fuzzy matches contain id", fuzzyMatches.contains("X0102-5"));
    assertEquals("fuzzy matches size", 2, fuzzyMatches.size());
    assertEquals("best fuzzy distance not zero: " + bestFuzzyDistance, 0, bestFuzzyDistance.intValue());
     
    matches = _service.getBestRunIdsForFuzzyId("999-75");
     
    bestFuzzyDistance = matches.keySet().first();
    fuzzyMatches = matches.get(bestFuzzyDistance);
     
    assertTrue("fuzzy matches contain id", fuzzyMatches.contains("MISC-YU-75"));
    assertEquals("fuzzy matches size", 1, fuzzyMatches.size());
    assertEquals("best fuzzy distance", 0, bestFuzzyDistance.intValue());
5
CodeRank
This code example shows how to use the following methods:clear
This code example shows how to use the following methods:keySet
	} 
 
	@Override 
	public Set<String> getTagNames()
	{ 
		return (m_tags.keySet());
	} 
 
	@Override 
	public Set<String> getTagValues(String tag)
	{ 
		return (m_tags.get(tag));
	} 
} 
4
CodeRank
See Code Examples for Guava TreeMultimap Methods: