@Test(expected = NullPointerException.class) public void addGeneSymbolNullThrowsException() { this.builder.add(null, GENE_2_ID, this.term2); }
void add(@Nonnull final String geneSymbol, @Nonnull final String geneId, @Nonnull final VocabularyTerm term) { Validate.notNull(geneSymbol, "The gene symbol must not be null."); Validate.notNull(geneId, "The gene ID must not be null."); Validate.notNull(term, "The vocabulary term must not be null"); if (CollectionUtils.isEmpty(this.exclusions) || (!this.exclusions.contains(geneSymbol) && !this.exclusions.contains(geneId))) { final DefaultTermsForGeneImpl termsForGene = new DefaultTermsForGeneImpl(geneSymbol, geneId); termsForGene.addTerm(term); this.termsForGeneMap.put(geneId, termsForGene); } }
TermsForGeneBuilder { void add(@Nonnull final String geneSymbol, @Nonnull final String geneId, @Nonnull final VocabularyTerm term) { Validate.notNull(geneSymbol, "The gene symbol must not be null."); Validate.notNull(geneId, "The gene ID must not be null."); Validate.notNull(term, "The vocabulary term must not be null"); if (CollectionUtils.isEmpty(this.exclusions) || (!this.exclusions.contains(geneSymbol) && !this.exclusions.contains(geneId))) { final DefaultTermsForGeneImpl termsForGene = new DefaultTermsForGeneImpl(geneSymbol, geneId); termsForGene.addTerm(term); this.termsForGeneMap.put(geneId, termsForGene); } } }
TermsForGeneBuilder { void add(@Nonnull final String geneSymbol, @Nonnull final String geneId, @Nonnull final VocabularyTerm term) { Validate.notNull(geneSymbol, "The gene symbol must not be null."); Validate.notNull(geneId, "The gene ID must not be null."); Validate.notNull(term, "The vocabulary term must not be null"); if (CollectionUtils.isEmpty(this.exclusions) || (!this.exclusions.contains(geneSymbol) && !this.exclusions.contains(geneId))) { final DefaultTermsForGeneImpl termsForGene = new DefaultTermsForGeneImpl(geneSymbol, geneId); termsForGene.addTerm(term); this.termsForGeneMap.put(geneId, termsForGene); } } TermsForGeneBuilder(@Nullable final Collection<String> excludedGenes); }
TermsForGeneBuilder { void add(@Nonnull final String geneSymbol, @Nonnull final String geneId, @Nonnull final VocabularyTerm term) { Validate.notNull(geneSymbol, "The gene symbol must not be null."); Validate.notNull(geneId, "The gene ID must not be null."); Validate.notNull(term, "The vocabulary term must not be null"); if (CollectionUtils.isEmpty(this.exclusions) || (!this.exclusions.contains(geneSymbol) && !this.exclusions.contains(geneId))) { final DefaultTermsForGeneImpl termsForGene = new DefaultTermsForGeneImpl(geneSymbol, geneId); termsForGene.addTerm(term); this.termsForGeneMap.put(geneId, termsForGene); } } TermsForGeneBuilder(@Nullable final Collection<String> excludedGenes);  }
TermsForGeneBuilder { void add(@Nonnull final String geneSymbol, @Nonnull final String geneId, @Nonnull final VocabularyTerm term) { Validate.notNull(geneSymbol, "The gene symbol must not be null."); Validate.notNull(geneId, "The gene ID must not be null."); Validate.notNull(term, "The vocabulary term must not be null"); if (CollectionUtils.isEmpty(this.exclusions) || (!this.exclusions.contains(geneSymbol) && !this.exclusions.contains(geneId))) { final DefaultTermsForGeneImpl termsForGene = new DefaultTermsForGeneImpl(geneSymbol, geneId); termsForGene.addTerm(term); this.termsForGeneMap.put(geneId, termsForGene); } } TermsForGeneBuilder(@Nullable final Collection<String> excludedGenes);   }