@Test public void testAddTagToTeam() throws Exception { TeamTagMap ttm = new TeamTagMap(); TeamTagMap ttmAfter = ttm.addTagToTeam("ABCDEFF012", 0); assertThat(ttm.tagToTeam("ABCDEFF012"), equalTo(Optional.empty())); assertThat(ttmAfter.getTagToTeam(), hasEntry(new TagId("ABCDEFF012"), 0)); assertThat(ttmAfter.tagToTeam("ABCDEFF012"), equalTo(Optional.of(0))); }
public TeamTagMap addTagToTeam(String tag, int team) throws DecodingException { return addTagToTeam(new TagId(tag), team); }
TeamTagMap { public TeamTagMap addTagToTeam(String tag, int team) throws DecodingException { return addTagToTeam(new TagId(tag), team); } }
TeamTagMap { public TeamTagMap addTagToTeam(String tag, int team) throws DecodingException { return addTagToTeam(new TagId(tag), team); } TeamTagMap(); private  TeamTagMap(ImmutableMap<TagId,Integer> tagToTeam); }
TeamTagMap { public TeamTagMap addTagToTeam(String tag, int team) throws DecodingException { return addTagToTeam(new TagId(tag), team); } TeamTagMap(); private  TeamTagMap(ImmutableMap<TagId,Integer> tagToTeam); TeamTagMap addTagToTeam(String tag, int team); TeamTagMap addTagToTeam(TagId tag, int team); TeamTagMap removeTag(String tag); TeamTagMap removeTag(TagId tag); Optional<Integer> tagToTeam(String tag); Optional<Integer> tagToTeam(TagId tag); Map<TagId, Integer> getTagToTeam(); }
TeamTagMap { public TeamTagMap addTagToTeam(String tag, int team) throws DecodingException { return addTagToTeam(new TagId(tag), team); } TeamTagMap(); private  TeamTagMap(ImmutableMap<TagId,Integer> tagToTeam); TeamTagMap addTagToTeam(String tag, int team); TeamTagMap addTagToTeam(TagId tag, int team); TeamTagMap removeTag(String tag); TeamTagMap removeTag(TagId tag); Optional<Integer> tagToTeam(String tag); Optional<Integer> tagToTeam(TagId tag); Map<TagId, Integer> getTagToTeam();  }