Code example for ImmutableMultimap.Builder

Methods: put

0
        .build();
    assertEquals(Arrays.asList(1), multimap.get("one"));
  } 
 
  public void testBuilder_withImmutableEntryAndNullContents() { 
    Builder<String, Integer> builder = new Builder<String, Integer>();
    try { 
      builder.put(Maps.immutableEntry("one", (Integer) null));
      fail();
    } catch (NullPointerException expected) {
    } 
    try { 
      builder.put(Maps.immutableEntry((String) null, 1));
      fail();
    } catch (NullPointerException expected) {
    } 
  } 
 
  private static class StringHolder { 
    String string;
Connect your IDE to all the code out there  Get Codota for Java