Class Snapshot
java.lang.Object
org.apache.maven.artifact.repository.metadata.v4.Snapshot
- All Implemented Interfaces:
- Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Snapshot
extends Object
implements Serializable
Snapshot data for the last artifact corresponding to the SNAPSHOT base version
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Snapshot instances.
- 
Method SummaryModifier and TypeMethodDescriptionintThe incremental build numberThe timestamp when this version was deployed.booleanWhether to use a local copy instead (with filename that includes the base version)static Snapshot.BuilderCreates a newSnapshotbuilder instance.static Snapshot.BuildernewBuilder(boolean withDefaults) Creates a newSnapshotbuilder instance using default values or not.static Snapshot.BuildernewBuilder(Snapshot from) Creates a newSnapshotbuilder instance using the specified object as a basis.static Snapshot.BuildernewBuilder(Snapshot from, boolean forceCopy) Creates a newSnapshotbuilder instance using the specified object as a basis.static SnapshotCreates a newSnapshotinstance.static SnapshotnewInstance(boolean withDefaults) Creates a newSnapshotinstance using default values or not.with()Creates a new builder with this object as the basis.withBuildNumber(int buildNumber) Creates a newSnapshotinstance using the specified buildNumber.withLocalCopy(boolean localCopy) Creates a newSnapshotinstance using the specified localCopy.withTimestamp(String timestamp) Creates a newSnapshotinstance using the specified timestamp.
- 
Method Details- 
getTimestampThe timestamp when this version was deployed. The timestamp is expressed using UTC in the format yyyyMMdd.HHmmss.- Returns:
- a String
 
- 
getBuildNumberpublic int getBuildNumber()The incremental build number- Returns:
- a int
 
- 
isLocalCopypublic boolean isLocalCopy()Whether to use a local copy instead (with filename that includes the base version)- Returns:
- a boolean
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withTimestampCreates a newSnapshotinstance using the specified timestamp.- Parameters:
- timestamp- the new- Stringto use
- Returns:
- a Snapshotwith the specified timestamp
 
- 
withBuildNumberCreates a newSnapshotinstance using the specified buildNumber.- Parameters:
- buildNumber- the new- intto use
- Returns:
- a Snapshotwith the specified buildNumber
 
- 
withLocalCopyCreates a newSnapshotinstance using the specified localCopy.- Parameters:
- localCopy- the new- booleanto use
- Returns:
- a Snapshotwith the specified localCopy
 
- 
newInstanceCreates a newSnapshotinstance. Equivalent tonewInstance(true).- Returns:
- a new Snapshot
- See Also:
 
- 
newInstanceCreates a newSnapshotinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Snapshot
 
- 
newBuilderCreates a newSnapshotbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newSnapshotbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newSnapshotbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Snapshotinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newSnapshotbuilder instance using the specified object as a basis.- Parameters:
- from- the- Snapshotinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-