public class ValueBuilder extends Object
ValueBuilder
instance.Modifier and Type | Method and Description |
---|---|
Value |
build()
Create an
Value based in the information given to the Builder, included all their children. |
static Set<Value> |
getValuesFor(List<String> values)
|
static Set<Value> |
getValuesFor(Map<String,String> values)
|
static Set<Value> |
getValuesFor(Stream<String> values)
|
static Set<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 createdValueBuilder
public 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 partValueBuilder
public static Set<Value> getValuesFor(String... values)
values
from an array of Strings.public static Set<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 name
public 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)
Copyright © 2018. All rights reserved.