Guava ImmutableListMultimap - 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 ImmutableListMultimap class.

This code example shows how to use the following methods:isEmpty
This code example shows how to use the following methods:isEmpty
This code example shows how to use the following methods:get
    @Ignore("Why is Guava reordering values?") 
    @Test
    public void test_groupBy_unordered_lists_2_keys_serial_eager_guava() 
    { 
        ImmutableListMultimap<Boolean, Integer> multimap = this.groupBy_unordered_lists_2_keys_serial_eager_guava(); 
        ImmutableList<Integer> odds = multimap.get(false); 
        ImmutableList<Integer> evens = multimap.get(true); 
        Verify.assertListsEqual(Interval.fromToBy(0, 999_999, 2), evens); 
        Verify.assertListsEqual(Interval.fromToBy(1, 999_999, 2), odds); 
    } 
 
    @Warmup(iterations = 20) 
    @Measurement(iterations = 10) 
    @GenerateMicroBenchmark 
    public ImmutableListMultimap<Integer, Integer> groupBy_unordered_lists_100_keys_serial_eager_guava()
    { 
        ImmutableListMultimap<Integer, Integer> multimap = Multimaps.index(this.integersJDK, each -> each % 100);
        Verify.assertSize(100, multimap.asMap());
        return multimap;
    } 
3
CodeRank
This code example shows how to use the following methods:equals
        if (!(other instanceof Args)) { 
            return false; 
        } 
 
        Args args = (Args) other;
        return args._options.equals(_options)
            && args._arguments.equals(_arguments)
            && args._oneChar.equals(_oneChar);
    } 
 
    @Override 
    public int hashCode() 
    { 
        return Objects.hashCode(_options, _arguments);
    } 
 
    private static void quote(String in, StringBuilder out)
    { 
        for (int i = 0; i < in.length(); i++) {
            switch (in.charAt(i)) {
2
CodeRank
See Code Examples for Guava ImmutableListMultimap Methods: