/** * Sets or replaces all elements for {@link ContainerForMulti#getChilds() childs} list. * @param elements An iterable of childs elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("childs") public final Builder childs(Iterable<? extends Element> elements) { this.childs = ImmutableList.builder(); return addAllChilds(elements); }
userPathBuilder.initContainer(ImmutableContainerForMulti.builder().name(NAME_INIT).tag(TAG_INIT).addAllChilds(childContainer.getChilds()).build()); } else{ userPathBuilder.initContainer(init); userPathBuilder.actionsContainer(ImmutableContainerForMulti.builder().name(NAME_ACTIONS).tag(TAG_ACTIONS).addAllChilds(childContainer.getChilds()).build()); } else{ userPathBuilder.actionsContainer(actions); userPathBuilder.endContainer(ImmutableContainerForMulti.builder().name(NAME_END).tag(TAG_END).addAllChilds(childContainer.getChilds()).build()); } else{ userPathBuilder.endContainer(end);
/** * @param json A JSON-bindable data structure * @return An immutable value type * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure */ @Deprecated @JsonCreator(mode = JsonCreator.Mode.DELEGATING) static ImmutableContainerForMulti fromJson(Json json) { ImmutableContainerForMulti.Builder builder = ImmutableContainerForMulti.builder(); if (json.tag != null) { builder.tag(json.tag); } if (json.childs != null) { builder.addAllChilds(json.childs); } if (json.isSharedIsSet) { builder.isShared(json.isShared); } if (json.name != null) { builder.name(json.name); } if (json.description != null) { builder.description(json.description); } return builder.build(); }
private void from(Object object) { if (object instanceof ShareableElement) { ShareableElement instance = (ShareableElement) object; isShared(instance.isShared()); } if (object instanceof IContainer) { IContainer instance = (IContainer) object; addAllChilds(instance.getChilds()); } if (object instanceof Element) { Element instance = (Element) object; name(instance.getName()); Optional<String> descriptionOptional = instance.getDescription(); if (descriptionOptional.isPresent()) { description(descriptionOptional); } } if (object instanceof ContainerForMulti) { ContainerForMulti instance = (ContainerForMulti) object; tag(instance.getTag()); } }