public class ValueBuilder extends Object
ValueBuilder instance.| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.api.values.Value |
build()
Create an
Value based in the information given to the Builder, included all their children. |
static Set<org.mule.runtime.api.values.Value> |
getValuesFor(List<String> values)
Utility to create single level
values from an List of Strings. |
static Set<org.mule.runtime.api.values.Value> |
getValuesFor(Map<String,String> values)
Utility to create single level
values from an Map of Strings to Strings. |
static Set<org.mule.runtime.api.values.Value> |
getValuesFor(Stream<String> values)
Utility to create single level
values from an Stream of Strings. |
static Set<org.mule.runtime.api.values.Value> |
getValuesFor(String... values)
Utility to create single level
values from an array of Strings. |
static ValueBuilder |
newValue(String id)
Creates and returns new instance of a
ValueBuilder, to help building a new Value
represented by the given |
static ValueBuilder |
newValue(String id,
String partName)
Creates and returns new instance of a
ValueBuilder, to help building a new Value
represented by the given |
protected void |
setPartName(String partName) |
ValueBuilder |
withChild(ValueBuilder valueBuilder)
Adds a new
ValueBuilder child to the Value that is being built. |
ValueBuilder |
withDisplayName(String displayName)
Adds a display name to the
Value that is being built |
public static ValueBuilder newValue(String id)
ValueBuilder, to help building a new Value
represented by the given id - of the Value to be createdValueBuilderpublic static ValueBuilder newValue(String id, String partName)
ValueBuilder, to help building a new Value
represented by the given id - of the Value to be createdpartName - the name of the partValueBuilderpublic static Set<org.mule.runtime.api.values.Value> getValuesFor(String... values)
values from an array of Strings.public static Set<org.mule.runtime.api.values.Value> getValuesFor(List<String> values)
values from an List of Strings.public static Set<org.mule.runtime.api.values.Value> getValuesFor(Stream<String> values)
values from an Stream of Strings.public static Set<org.mule.runtime.api.values.Value> getValuesFor(Map<String,String> values)
values from an Map of Strings to Strings.
The key of the Map will be considered as the id and the value as
display namepublic ValueBuilder withDisplayName(String displayName)
Value that is being builtdisplayName - of the Value to be createdthis builder with the configured display namepublic ValueBuilder withChild(ValueBuilder valueBuilder)
ValueBuilder child to the Value that is being built.valueBuilder - the ValueBuilder that is used to create the instance of the new child.this builder with a new child.protected void setPartName(String partName)
public org.mule.runtime.api.values.Value build()
Value based in the information given to the Builder, included all their children.ValueCopyright © 2017 MuleSoft, Inc.. All rights reserved.