Guava MultimapBuilder.MultimapBuilderWithKeys - 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 MultimapBuilder.MultimapBuilderWithKeys class.

This code example shows how to use the following methods:treeSetValues
public class MultimapBuilderTest extends TestCase {
 
  @GwtIncompatible("doesn't build without explicit type parameters on build() methods") 
  public void testGenerics() { 
    ListMultimap<String, Integer> a = MultimapBuilder.hashKeys().arrayListValues().build();
    SortedSetMultimap<String, Integer> b = MultimapBuilder.linkedHashKeys().treeSetValues().build();
    SetMultimap<String, Integer> c =
        MultimapBuilder.treeKeys(String.CASE_INSENSITIVE_ORDER).hashSetValues().build();
  } 
 
  public void testGenerics_gwtCompatible() { 
    ListMultimap<String, Integer> a =
        MultimapBuilder.hashKeys().arrayListValues().<String, Integer>build();
    SortedSetMultimap<String, Integer> b =
        MultimapBuilder.linkedHashKeys().treeSetValues().<String, Integer>build();
    SetMultimap<String, Integer> c = MultimapBuilder.treeKeys(String.CASE_INSENSITIVE_ORDER)
        .hashSetValues().<String, Integer>build();
  } 
 
  @GwtIncompatible("doesn't build without explicit type parameters on build() methods") 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Guava MultimapBuilder.MultimapBuilderWithKeys Methods: