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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableMetadata.Builder
builder()
Creates a builder forImmutableMetadata
.static ImmutableMetadata
Creates an immutable copy of aMetadata
value.boolean
This instance is equal to all instances ofImmutableMetadata
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:token
.token()
toString()
Prints the immutable valueMetadata
with attribute values.final ImmutableMetadata
Copy the current immutable object by setting a value for thetoken
attribute.
-
Method Details
-
token
-
withToken
Copy the current immutable object by setting a value for thetoken
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableMetadata
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:token
. -
toString
Prints the immutable valueMetadata
with attribute values. -
copyOf
Creates an immutable copy of aMetadata
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 Metadata instance
-
builder
Creates a builder forImmutableMetadata
.ImmutableMetadata.builder() .token(String) // required
token
.build();- Returns:
- A new ImmutableMetadata builder
-