@NotThreadSafe public static final class VersionedAliasDescriptionArg.Builder extends Object
VersionedAliasDescriptionArg
.
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.
public final VersionedAliasDescriptionArg.Builder from(BuildRuleArg instance)
com.facebook.buck.core.description.arg.BuildRuleArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.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 VersionedAliasDescriptionArg.Builder from(VersionedAliasDescriptionArg instance)
VersionedAliasDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder from(com.facebook.buck.versions.VersionedAliasDescription.AbstractVersionedAliasDescriptionArg instance)
AbstractVersionedAliasDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder putVersions(Version key, BuildTarget value)
versions
map.key
- The key in the versions mapvalue
- The associated value in the versions mapthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder putVersions(Map.Entry<? extends Version,? extends BuildTarget> entry)
versions
map. Nulls are not permittedentry
- The key and value entrythis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder setVersions(Map<? extends Version,? extends BuildTarget> entries)
versions
map. Nulls are not permittedentries
- The entries that will be added to the versions mapthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder putAllVersions(Map<? extends Version,? extends BuildTarget> entries)
versions
map. Nulls are not permittedentries
- The entries that will be added to the versions mapthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final VersionedAliasDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final VersionedAliasDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic VersionedAliasDescriptionArg build()
VersionedAliasDescriptionArg
.IllegalStateException
- if any required attributes are missing