@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableMavenArtifact extends Object implements MavenArtifact
MavenArtifact.
Use the builder to create immutable instances:
new MavenArtifact.Builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableMavenArtifact.Builder
Builds instances of type
ImmutableMavenArtifact. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableMavenArtifact |
copyOf(MavenArtifact instance)
Creates an immutable copy of a
MavenArtifact value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableMavenArtifact that have equal attribute values. |
String |
getArtifactId() |
String |
getGroupId() |
Optional<String> |
getVersion() |
int |
hashCode()
Computes a hash code from attributes:
groupId, artifactId, version. |
String |
toString()
Prints the immutable value
MavenArtifact with attribute values. |
ImmutableMavenArtifact |
withArtifactId(String value)
Copy the current immutable object by setting a value for the
artifactId attribute. |
ImmutableMavenArtifact |
withGroupId(String value)
Copy the current immutable object by setting a value for the
groupId attribute. |
ImmutableMavenArtifact |
withVersion(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
version attribute. |
ImmutableMavenArtifact |
withVersion(String value)
Copy the current immutable object by setting a present value for the optional
version attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitfrompublic String getGroupId()
getGroupId in interface ArtifactgroupId attributepublic String getArtifactId()
getArtifactId in interface ArtifactartifactId attributepublic Optional<String> getVersion()
getVersion in interface Artifactversion attributepublic final ImmutableMavenArtifact withGroupId(String value)
groupId attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for groupIdthis objectpublic final ImmutableMavenArtifact withArtifactId(String value)
artifactId attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for artifactIdthis objectpublic final ImmutableMavenArtifact withVersion(String value)
version attribute.value - The value for versionthis objectpublic final ImmutableMavenArtifact withVersion(Optional<String> optional)
version attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for versionthis objectpublic boolean equals(Object another)
ImmutableMavenArtifact that have equal attribute values.public int hashCode()
groupId, artifactId, version.public String toString()
MavenArtifact with attribute values.public static ImmutableMavenArtifact copyOf(MavenArtifact instance)
MavenArtifact value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copyCopyright © 2020 The Apache Software Foundation. All rights reserved.