@NotThreadSafe public static final class ConfigSettingArg.Builder extends Object
ConfigSettingArg
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
Modifier and Type | Method and Description |
---|---|
ConfigSettingArg.Builder |
addAllConstraintValues(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
constraintValues sortedSet. |
ConfigSettingArg.Builder |
addConstraintValues(UnconfiguredBuildTarget... elements)
Adds elements to
constraintValues sortedSet. |
ConfigSettingArg.Builder |
addConstraintValues(UnconfiguredBuildTarget element)
Adds one element to
constraintValues sortedSet. |
ConfigSettingArg |
build()
Builds a new
ConfigSettingArg . |
ConfigSettingArg.Builder |
from(ConfigSettingArg instance)
Fill a builder with attribute values from the provided
ConfigSettingArg instance. |
ConfigSettingArg.Builder |
from(com.facebook.buck.core.rules.configsetting.ConfigSettingDescription.AbstractConfigSettingArg instance)
Copy abstract value type
AbstractConfigSettingArg instance into builder. |
ConfigSettingArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
ConfigSettingArg.Builder |
putAllValues(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
values map. |
ConfigSettingArg.Builder |
putValues(Map.Entry<String,? extends String> entry)
Put one entry to the
values map. |
ConfigSettingArg.Builder |
putValues(String key,
String value)
Put one entry to the
values map. |
ConfigSettingArg.Builder |
setConstraintValues(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
constraintValues sortedSet. |
ConfigSettingArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
ConfigSettingArg.Builder |
setValues(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
values map. |
public final ConfigSettingArg.Builder from(ConfigSettingArg instance)
ConfigSettingArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder from(com.facebook.buck.core.rules.configsetting.ConfigSettingDescription.AbstractConfigSettingArg instance)
AbstractConfigSettingArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder from(ConstructorArg instance)
com.facebook.buck.core.description.arg.ConstructorArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder putValues(String key, String value)
values
map.key
- The key in the values mapvalue
- The associated value in the values mapthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder putValues(Map.Entry<String,? extends String> entry)
values
map. Nulls are not permittedentry
- The key and value entrythis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder setValues(Map<String,? extends String> entries)
values
map. Nulls are not permittedentries
- The entries that will be added to the values mapthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder putAllValues(Map<String,? extends String> entries)
values
map. Nulls are not permittedentries
- The entries that will be added to the values mapthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder addConstraintValues(UnconfiguredBuildTarget element)
constraintValues
sortedSet.element
- A constraintValues elementthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder addConstraintValues(UnconfiguredBuildTarget... elements)
constraintValues
sortedSet.elements
- An array of constraintValues elementsthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder setConstraintValues(Iterable<? extends UnconfiguredBuildTarget> elements)
constraintValues
sortedSet.elements
- An iterable of constraintValues elementsthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder addAllConstraintValues(Iterable<? extends UnconfiguredBuildTarget> elements)
constraintValues
sortedSet.elements
- An iterable of constraintValues elementsthis
builder for use in a chained invocationpublic final ConfigSettingArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic ConfigSettingArg build()
ConfigSettingArg
.IllegalStateException
- if any required attributes are missing