java.lang.Object
org.mule.sdk.api.values.ValueBuilder
An implementation of the builder design pattern to create a new
ValueBuilder instance.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create anValuebased in the information given to the Builder, included all their children.getValuesFor(String... values) Utility to create single levelvaluesfrom an array of Strings.getValuesFor(List<String> values) getValuesFor(Map<String, String> values) getValuesFor(Stream<String> values) static ValueBuilderCreates and returns new instance of aValueBuilder, to help building a newValuerepresented by the givenstatic ValueBuilderCreates and returns new instance of aValueBuilder, to help building a newValuerepresented by the givenprotected voidsetPartName(String partName) withChild(ValueBuilder valueBuilder) Adds a newValueBuilderchild to theValuethat is being built.withDisplayName(String displayName) Adds a display name to theValuethat is being built
-
Method Details
-
newValue
Creates and returns new instance of aValueBuilder, to help building a newValuerepresented by the given- Parameters:
id- of theValueto be created- Returns:
- an initialized instance of
ValueBuilder
-
newValue
Creates and returns new instance of aValueBuilder, to help building a newValuerepresented by the given- Parameters:
id- of theValueto be createdpartName- the name of the part- Returns:
- an initialized instance of
ValueBuilder
-
getValuesFor
Utility to create single levelvaluesfrom an array of Strings. -
getValuesFor
-
getValuesFor
-
getValuesFor
Utility to create single levelvaluesfrom anMapof Strings to Strings. The key of the Map will be considered as theidand the value asdisplay name -
withDisplayName
Adds a display name to theValuethat is being built- Parameters:
displayName- of theValueto be created- Returns:
thisbuilder with the configured display name
-
withChild
Adds a newValueBuilderchild to theValuethat is being built.- Parameters:
valueBuilder- theValueBuilderthat is used to create the instance of the new child.- Returns:
thisbuilder with a new child.
-
setPartName
-
build
Create anValuebased in the information given to the Builder, included all their children.- Returns:
- the built
Value
-