@NotThreadSafe public static final class ImmutableToolInfo.Builder extends Object
ImmutableToolInfo.
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 ImmutableToolInfo.Builder from(ToolInfo instance)
ToolInfo instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder putEnvironmentVariables(String key, String value)
environmentVariables map.key - The key in the environmentVariables mapvalue - The associated value in the environmentVariables mapthis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder putEnvironmentVariables(Map.Entry<String,? extends String> entry)
environmentVariables map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder environmentVariables(Map<String,? extends String> entries)
environmentVariables map. Nulls are not permittedentries - The entries that will be added to the environmentVariables mapthis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder putAllEnvironmentVariables(Map<String,? extends String> entries)
environmentVariables map. Nulls are not permittedentries - The entries that will be added to the environmentVariables mapthis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder addPathElements(String element)
pathElements list.element - A pathElements elementthis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder addPathElements(String... elements)
pathElements list.elements - An array of pathElements elementsthis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder pathElements(Iterable<String> elements)
pathElements list.elements - An iterable of pathElements elementsthis builder for use in a chained invocationpublic final ImmutableToolInfo.Builder addAllPathElements(Iterable<String> elements)
pathElements list.elements - An iterable of pathElements elementsthis builder for use in a chained invocationpublic ImmutableToolInfo build()
ImmutableToolInfo.IllegalStateException - if any required attributes are missingCopyright © 2016–2021. All rights reserved.