@Test public void testBuilder() { NewznabXmlItem item = RssItemBuilder.builder("title") .group("group") .poster("poster") .size(1000L) .category("category") .categoryNewznab("5000") .description("desc") .link("link") .hasNfo(true) .grabs(10).build(); Map<String, String> attributes = item.getNewznabAttributes().stream().collect(Collectors.toMap(NewznabAttribute::getName, NewznabAttribute::getValue)); assertEquals("group", attributes.get("group")); assertEquals("poster", attributes.get("poster")); assertEquals("5000", attributes.get("category")); assertEquals("1", attributes.get("nfo")); assertEquals(Long.valueOf(1000), item.getEnclosure().getLength()); assertEquals("desc", item.getDescription()); assertEquals("category", item.getCategory()); assertEquals("link", item.getEnclosure().getUrl()); }
public static RssItemBuilder builder() { RssItemBuilder builder = new RssItemBuilder(); return builder; }
RssItemBuilder { public static RssItemBuilder builder() { RssItemBuilder builder = new RssItemBuilder(); return builder; } }
RssItemBuilder { public static RssItemBuilder builder() { RssItemBuilder builder = new RssItemBuilder(); return builder; } private  RssItemBuilder(); }
RssItemBuilder { public static RssItemBuilder builder() { RssItemBuilder builder = new RssItemBuilder(); return builder; } private  RssItemBuilder(); static RssItemBuilder builder(); static RssItemBuilder builder(String title); RssItemBuilder title(String title); RssItemBuilder link(String link); RssItemBuilder size(long size); RssItemBuilder pubDate(Instant pubDate); RssItemBuilder rssGuid(NewznabXmlGuid rssGuid); RssItemBuilder description(String description); RssItemBuilder comments(String comments); RssItemBuilder category(String category); RssItemBuilder grabs(Integer grabs); RssItemBuilder newznabAttributes(List<NewznabAttribute> newznabAttributes); RssItemBuilder torznabAttributes(List<NewznabAttribute> torznabAttributes); RssItemBuilder enclosure(NewznabXmlEnclosure enclosure); RssItemBuilder hasNfo(boolean hasNfo); RssItemBuilder poster(String poster); RssItemBuilder group(String group); RssItemBuilder linksFromBaseUrl(String baseUrl); RssItemBuilder categoryNewznab(String... categories); NewznabXmlItem build(); }
RssItemBuilder { public static RssItemBuilder builder() { RssItemBuilder builder = new RssItemBuilder(); return builder; } private  RssItemBuilder(); static RssItemBuilder builder(); static RssItemBuilder builder(String title); RssItemBuilder title(String title); RssItemBuilder link(String link); RssItemBuilder size(long size); RssItemBuilder pubDate(Instant pubDate); RssItemBuilder rssGuid(NewznabXmlGuid rssGuid); RssItemBuilder description(String description); RssItemBuilder comments(String comments); RssItemBuilder category(String category); RssItemBuilder grabs(Integer grabs); RssItemBuilder newznabAttributes(List<NewznabAttribute> newznabAttributes); RssItemBuilder torznabAttributes(List<NewznabAttribute> torznabAttributes); RssItemBuilder enclosure(NewznabXmlEnclosure enclosure); RssItemBuilder hasNfo(boolean hasNfo); RssItemBuilder poster(String poster); RssItemBuilder group(String group); RssItemBuilder linksFromBaseUrl(String baseUrl); RssItemBuilder categoryNewznab(String... categories); NewznabXmlItem build();  }