Class ImmutableAgentInfo
- java.lang.Object
-
- io.jenkins.plugins.projectenv.agent.ImmutableAgentInfo
-
- All Implemented Interfaces:
AgentInfo
,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableAgentInfo extends Object implements AgentInfo
Immutable implementation ofAgentInfo
.Use the builder to create immutable instances:
ImmutableAgentInfo.builder()
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableAgentInfo.Builder
Builds instances of typeImmutableAgentInfo
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableAgentInfo.Builder
builder()
Creates a builder forImmutableAgentInfo
.static ImmutableAgentInfo
copyOf(AgentInfo instance)
Creates an immutable copy of aAgentInfo
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableAgentInfo
that have equal attribute values.String
getLineSeparator()
OperatingSystem
getOperatingSystem()
int
hashCode()
Computes a hash code from attributes:operatingSystem
,lineSeparator
.String
toString()
Prints the immutable valueAgentInfo
with attribute values.ImmutableAgentInfo
withLineSeparator(String value)
Copy the current immutable object by setting a value for thelineSeparator
attribute.ImmutableAgentInfo
withOperatingSystem(OperatingSystem value)
Copy the current immutable object by setting a value for theoperatingSystem
attribute.
-
-
-
Method Detail
-
getOperatingSystem
public OperatingSystem getOperatingSystem()
- Specified by:
getOperatingSystem
in interfaceAgentInfo
- Returns:
- The value of the
operatingSystem
attribute
-
getLineSeparator
public String getLineSeparator()
- Specified by:
getLineSeparator
in interfaceAgentInfo
- Returns:
- The value of the
lineSeparator
attribute
-
withOperatingSystem
public final ImmutableAgentInfo withOperatingSystem(OperatingSystem value)
Copy the current immutable object by setting a value for theoperatingSystem
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for operatingSystem- Returns:
- A modified copy of the
this
object
-
withLineSeparator
public final ImmutableAgentInfo withLineSeparator(String value)
Copy the current immutable object by setting a value for thelineSeparator
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for lineSeparator- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableAgentInfo
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:operatingSystem
,lineSeparator
.
-
toString
public String toString()
Prints the immutable valueAgentInfo
with attribute values.
-
copyOf
public static ImmutableAgentInfo copyOf(AgentInfo instance)
Creates an immutable copy of aAgentInfo
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 AgentInfo instance
-
builder
public static ImmutableAgentInfo.Builder builder()
Creates a builder forImmutableAgentInfo
.ImmutableAgentInfo.builder() .operatingSystem(io.jenkins.plugins.projectenv.agent.OperatingSystem) // required
operatingSystem
.lineSeparator(String) // requiredlineSeparator
.build();- Returns:
- A new ImmutableAgentInfo builder
-
-