Class ImmutableToolInfo
java.lang.Object
io.jenkins.plugins.projectenv.toolinfo.ImmutableToolInfo
- All Implemented Interfaces:
ToolInfo
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableToolInfo
extends Object
implements ToolInfo
Immutable implementation of
ToolInfo
.
Use the builder to create immutable instances:
ImmutableToolInfo.builder()
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableToolInfo.Builder
builder()
Creates a builder forImmutableToolInfo
.static ImmutableToolInfo
Creates an immutable copy of aToolInfo
value.boolean
This instance is equal to all instances ofImmutableToolInfo
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:primaryExecutable
,environmentVariables
,pathElements
,unhandledProjectResources
.toString()
Prints the immutable valueToolInfo
with attribute values.final ImmutableToolInfo
withEnvironmentVariables
(Map<String, ? extends String> entries) Copy the current immutable object by replacing theenvironmentVariables
map with the specified map.final ImmutableToolInfo
withPathElements
(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofpathElements
.final ImmutableToolInfo
withPathElements
(String... elements) Copy the current immutable object with elements that replace the content ofpathElements
.final ImmutableToolInfo
withPrimaryExecutable
(String value) Copy the current immutable object by setting a present value for the optionalprimaryExecutable
attribute.final ImmutableToolInfo
withPrimaryExecutable
(Optional<String> optional) Copy the current immutable object by setting an optional value for theprimaryExecutable
attribute.final ImmutableToolInfo
withUnhandledProjectResources
(Map<String, ? extends String> entries) Copy the current immutable object by replacing theunhandledProjectResources
map with the specified map.
-
Method Details
-
getPrimaryExecutable
- Specified by:
getPrimaryExecutable
in interfaceToolInfo
- Returns:
- The value of the
primaryExecutable
attribute
-
getEnvironmentVariables
- Specified by:
getEnvironmentVariables
in interfaceToolInfo
- Returns:
- The value of the
environmentVariables
attribute
-
getPathElements
- Specified by:
getPathElements
in interfaceToolInfo
- Returns:
- The value of the
pathElements
attribute
-
getUnhandledProjectResources
- Specified by:
getUnhandledProjectResources
in interfaceToolInfo
- Returns:
- The value of the
unhandledProjectResources
attribute
-
withPrimaryExecutable
Copy the current immutable object by setting a present value for the optionalprimaryExecutable
attribute.- Parameters:
value
- The value for primaryExecutable- Returns:
- A modified copy of
this
object
-
withPrimaryExecutable
Copy the current immutable object by setting an optional value for theprimaryExecutable
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for primaryExecutable- Returns:
- A modified copy of
this
object
-
withEnvironmentVariables
Copy the current immutable object by replacing theenvironmentVariables
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the environmentVariables map- Returns:
- A modified copy of
this
object
-
withPathElements
Copy the current immutable object with elements that replace the content ofpathElements
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withPathElements
Copy the current immutable object with elements that replace the content ofpathElements
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of pathElements elements to set- Returns:
- A modified copy of
this
object
-
withUnhandledProjectResources
Copy the current immutable object by replacing theunhandledProjectResources
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the unhandledProjectResources map- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableToolInfo
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:primaryExecutable
,environmentVariables
,pathElements
,unhandledProjectResources
. -
toString
Prints the immutable valueToolInfo
with attribute values. -
copyOf
Creates an immutable copy of aToolInfo
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable ToolInfo instance
-
builder
Creates a builder forImmutableToolInfo
.ImmutableToolInfo.builder() .primaryExecutable(String) // optional
primaryExecutable
.putEnvironmentVariables|putAllEnvironmentVariables(String => String) //environmentVariables
mappings .addPathElements|addAllPathElements(String) //pathElements
elements .putUnhandledProjectResources|putAllUnhandledProjectResources(String => String) //unhandledProjectResources
mappings .build();- Returns:
- A new ImmutableToolInfo builder
-