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 of
AgentInfo.
Use the builder to create immutable instances:
ImmutableAgentInfo.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAgentInfo.Builderbuilder()Creates a builder forImmutableAgentInfo.static ImmutableAgentInfoCreates an immutable copy of aAgentInfovalue.booleanThis instance is equal to all instances ofImmutableAgentInfothat have equal attribute values.inthashCode()Computes a hash code from attributes:operatingSystem,lineSeparator.toString()Prints the immutable valueAgentInfowith attribute values.final ImmutableAgentInfowithLineSeparator(String value) Copy the current immutable object by setting a value for thelineSeparatorattribute.final ImmutableAgentInfoCopy the current immutable object by setting a value for theoperatingSystemattribute.
-
Method Details
-
getOperatingSystem
- Specified by:
getOperatingSystemin interfaceAgentInfo- Returns:
- The value of the
operatingSystemattribute
-
getLineSeparator
- Specified by:
getLineSeparatorin interfaceAgentInfo- Returns:
- The value of the
lineSeparatorattribute
-
withOperatingSystem
Copy the current immutable object by setting a value for theoperatingSystemattribute. 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
thisobject
-
withLineSeparator
Copy the current immutable object by setting a value for thelineSeparatorattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableAgentInfothat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:operatingSystem,lineSeparator. -
toString
Prints the immutable valueAgentInfowith attribute values. -
copyOf
Creates an immutable copy of aAgentInfovalue. 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
Creates a builder forImmutableAgentInfo.ImmutableAgentInfo.builder() .operatingSystem(io.jenkins.plugins.projectenv.agent.OperatingSystem) // requiredoperatingSystem.lineSeparator(String) // requiredlineSeparator.build();- Returns:
- A new ImmutableAgentInfo builder
-