Class SnapshotVersion
java.lang.Object
org.apache.maven.artifact.repository.metadata.v4.SnapshotVersion
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class SnapshotVersion
extends Object
implements Serializable
Versioning information for a sub-artifact of the current snapshot artifact.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create SnapshotVersion instances. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe classifier of the sub-artifact.The file extension of the sub-artifact.The timestamp when this version information was last updated.The resolved snapshot version of the sub-artifact.inthashCode()static SnapshotVersion.BuilderCreates a newSnapshotVersionbuilder instance.static SnapshotVersion.BuildernewBuilder(boolean withDefaults) Creates a newSnapshotVersionbuilder instance using default values or not.static SnapshotVersion.BuildernewBuilder(SnapshotVersion from) Creates a newSnapshotVersionbuilder instance using the specified object as a basis.static SnapshotVersion.BuildernewBuilder(SnapshotVersion from, boolean forceCopy) Creates a newSnapshotVersionbuilder instance using the specified object as a basis.static SnapshotVersionCreates a newSnapshotVersioninstance.static SnapshotVersionnewInstance(boolean withDefaults) Creates a newSnapshotVersioninstance using default values or not.with()Creates a new builder with this object as the basis.withClassifier(String classifier) Creates a newSnapshotVersioninstance using the specified classifier.withExtension(String extension) Creates a newSnapshotVersioninstance using the specified extension.withUpdated(String updated) Creates a newSnapshotVersioninstance using the specified updated.withVersion(String version) Creates a newSnapshotVersioninstance using the specified version.
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getClassifier
The classifier of the sub-artifact. Each classifier and extension pair may only appear once.- Returns:
- a
String
-
getExtension
The file extension of the sub-artifact. Each classifier and extension pair may only appear once.- Returns:
- a
String
-
getVersion
The resolved snapshot version of the sub-artifact.- Returns:
- a
String
-
getUpdated
The timestamp when this version information was last updated. The timestamp is expressed using UTC in the format yyyyMMddHHmmss.- Returns:
- a
String
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withClassifier
Creates a newSnapshotVersioninstance using the specified classifier.- Parameters:
classifier- the newStringto use- Returns:
- a
SnapshotVersionwith the specified classifier
-
withExtension
Creates a newSnapshotVersioninstance using the specified extension.- Parameters:
extension- the newStringto use- Returns:
- a
SnapshotVersionwith the specified extension
-
withVersion
Creates a newSnapshotVersioninstance using the specified version.- Parameters:
version- the newStringto use- Returns:
- a
SnapshotVersionwith the specified version
-
withUpdated
Creates a newSnapshotVersioninstance using the specified updated.- Parameters:
updated- the newStringto use- Returns:
- a
SnapshotVersionwith the specified updated
-
newInstance
Creates a newSnapshotVersioninstance. Equivalent tonewInstance(true).- Returns:
- a new
SnapshotVersion - See Also:
-
newInstance
Creates a newSnapshotVersioninstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
SnapshotVersion
-
newBuilder
Creates a newSnapshotVersionbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newSnapshotVersionbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newSnapshotVersionbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theSnapshotVersioninstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newSnapshotVersionbuilder instance using the specified object as a basis.- Parameters:
from- theSnapshotVersioninstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-