@Test public void testEmptyBuild() { AttributeMergeBuilder bld = new AttributeMergeBuilder(TO_GET_SET); assertNotNull("null builder", bld.build()); assertTrue("null builder", bld.build().size() == 0); }
public List<Attribute> build() { final List<Attribute> attrs = CollectionUtil.newList(); for (Entry<String, List<Object>> entry : attributes.entrySet()) { final String name = entry.getKey(); final List<Object> value = entry.getValue(); if (!isInAttributesToGet(name)) { continue; } final Attribute attr = AttributeBuilder.build(name, value); attrs.add(attr); } return attrs; }
AttributeMergeBuilder { public List<Attribute> build() { final List<Attribute> attrs = CollectionUtil.newList(); for (Entry<String, List<Object>> entry : attributes.entrySet()) { final String name = entry.getKey(); final List<Object> value = entry.getValue(); if (!isInAttributesToGet(name)) { continue; } final Attribute attr = AttributeBuilder.build(name, value); attrs.add(attr); } return attrs; } }
AttributeMergeBuilder { public List<Attribute> build() { final List<Attribute> attrs = CollectionUtil.newList(); for (Entry<String, List<Object>> entry : attributes.entrySet()) { final String name = entry.getKey(); final List<Object> value = entry.getValue(); if (!isInAttributesToGet(name)) { continue; } final Attribute attr = AttributeBuilder.build(name, value); attrs.add(attr); } return attrs; } AttributeMergeBuilder(Collection<String> attrToGet);  AttributeMergeBuilder(String... names);  AttributeMergeBuilder(); }
AttributeMergeBuilder { public List<Attribute> build() { final List<Attribute> attrs = CollectionUtil.newList(); for (Entry<String, List<Object>> entry : attributes.entrySet()) { final String name = entry.getKey(); final List<Object> value = entry.getValue(); if (!isInAttributesToGet(name)) { continue; } final Attribute attr = AttributeBuilder.build(name, value); attrs.add(attr); } return attrs; } AttributeMergeBuilder(Collection<String> attrToGet);  AttributeMergeBuilder(String... names);  AttributeMergeBuilder(); AttributeMergeBuilder setAttribute(Attribute attr); AttributeMergeBuilder setAttribute(String name, Collection<?> obj); AttributeMergeBuilder setAttribute(String name, Object... objs); AttributeMergeBuilder addAttribute(Attribute attr); AttributeMergeBuilder addAttribute(String name, Collection<?> obj); AttributeMergeBuilder addAttribute(String name, Object... objs); List<Attribute> build(); boolean isInAttributesToGet(String name); List<Attribute> build(Collection<String> attrToGet); @Override String toString(); boolean hasExpectedValue(String name, int index, Object value); }
AttributeMergeBuilder { public List<Attribute> build() { final List<Attribute> attrs = CollectionUtil.newList(); for (Entry<String, List<Object>> entry : attributes.entrySet()) { final String name = entry.getKey(); final List<Object> value = entry.getValue(); if (!isInAttributesToGet(name)) { continue; } final Attribute attr = AttributeBuilder.build(name, value); attrs.add(attr); } return attrs; } AttributeMergeBuilder(Collection<String> attrToGet);  AttributeMergeBuilder(String... names);  AttributeMergeBuilder(); AttributeMergeBuilder setAttribute(Attribute attr); AttributeMergeBuilder setAttribute(String name, Collection<?> obj); AttributeMergeBuilder setAttribute(String name, Object... objs); AttributeMergeBuilder addAttribute(Attribute attr); AttributeMergeBuilder addAttribute(String name, Collection<?> obj); AttributeMergeBuilder addAttribute(String name, Object... objs); List<Attribute> build(); boolean isInAttributesToGet(String name); List<Attribute> build(Collection<String> attrToGet); @Override String toString(); boolean hasExpectedValue(String name, int index, Object value);  }