Package io.jenkins.plugins.trunk.model
Class ImmutableMetadata
java.lang.Object
io.jenkins.plugins.trunk.model.ImmutableMetadata
- All Implemented Interfaces:
Metadata
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableMetadata
extends Object
implements Metadata
Immutable implementation of
Metadata.
Use the builder to create immutable instances:
ImmutableMetadata.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableMetadata.Builderbuilder()Creates a builder forImmutableMetadata.static ImmutableMetadataCreates an immutable copy of aMetadatavalue.booleanThis instance is equal to all instances ofImmutableMetadatathat have equal attribute values.inthashCode()Computes a hash code from attributes:token.token()toString()Prints the immutable valueMetadatawith attribute values.final ImmutableMetadataCopy the current immutable object by setting a value for thetokenattribute.
-
Method Details
-
token
-
withToken
Copy the current immutable object by setting a value for thetokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for token- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableMetadatathat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:token. -
toString
Prints the immutable valueMetadatawith attribute values. -
copyOf
Creates an immutable copy of aMetadatavalue. 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 Metadata instance
-
builder
Creates a builder forImmutableMetadata.ImmutableMetadata.builder() .token(String) // requiredtoken.build();- Returns:
- A new ImmutableMetadata builder
-