Package org.apache.maven.api.metadata
Class SnapshotVersion
java.lang.Object
org.apache.maven.api.metadata.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
Modifier and TypeClassDescriptionstatic class
Builder class used to create SnapshotVersion instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
SnapshotVersion
(SnapshotVersion.Builder builder) Constructor for this class, to be called from its subclasses andSnapshotVersion.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
The 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.int
hashCode()
static SnapshotVersion.Builder
Creates a newSnapshotVersion
builder instance.static SnapshotVersion.Builder
newBuilder
(boolean withDefaults) Creates a newSnapshotVersion
builder instance using default values or not.static SnapshotVersion.Builder
newBuilder
(SnapshotVersion from) Creates a newSnapshotVersion
builder instance using the specified object as a basis.static SnapshotVersion.Builder
newBuilder
(SnapshotVersion from, boolean forceCopy) Creates a newSnapshotVersion
builder instance using the specified object as a basis.static SnapshotVersion
Creates a newSnapshotVersion
instance.static SnapshotVersion
newInstance
(boolean withDefaults) Creates a newSnapshotVersion
instance using default values or not.with()
Creates a new builder with this object as the basis.withClassifier
(String classifier) Creates a newSnapshotVersion
instance using the specified classifier.withExtension
(String extension) Creates a newSnapshotVersion
instance using the specified extension.withUpdated
(String updated) Creates a newSnapshotVersion
instance using the specified updated.withVersion
(String version) Creates a newSnapshotVersion
instance using the specified version.
-
Constructor Details
-
SnapshotVersion
Constructor for this class, to be called from its subclasses andSnapshotVersion.Builder
.- See Also:
-
-
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 newSnapshotVersion
instance using the specified classifier.- Parameters:
classifier
- the newString
to use- Returns:
- a
SnapshotVersion
with the specified classifier
-
withExtension
Creates a newSnapshotVersion
instance using the specified extension.- Parameters:
extension
- the newString
to use- Returns:
- a
SnapshotVersion
with the specified extension
-
withVersion
Creates a newSnapshotVersion
instance using the specified version.- Parameters:
version
- the newString
to use- Returns:
- a
SnapshotVersion
with the specified version
-
withUpdated
Creates a newSnapshotVersion
instance using the specified updated.- Parameters:
updated
- the newString
to use- Returns:
- a
SnapshotVersion
with the specified updated
-
newInstance
Creates a newSnapshotVersion
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
SnapshotVersion
- See Also:
-
newInstance
Creates a newSnapshotVersion
instance 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 newSnapshotVersion
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newSnapshotVersion
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newSnapshotVersion
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theSnapshotVersion
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newSnapshotVersion
builder instance using the specified object as a basis.- Parameters:
from
- theSnapshotVersion
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-