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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Snapshot instances. - 
Method Summary
Modifier 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
- 
getTimestamp
The timestamp when this version was deployed. The timestamp is expressed using UTC in the format yyyyMMdd.HHmmss.- Returns:
 - a 
String 
 - 
getBuildNumber
public int getBuildNumber()The incremental build number- Returns:
 - a 
int 
 - 
isLocalCopy
public boolean isLocalCopy()Whether to use a local copy instead (with filename that includes the base version)- Returns:
 - a 
boolean 
 - 
with
Creates a new builder with this object as the basis.- Returns:
 - a 
Builder 
 - 
withTimestamp
Creates a newSnapshotinstance using the specified timestamp.- Parameters:
 timestamp- the newStringto use- Returns:
 - a 
Snapshotwith the specified timestamp 
 - 
withBuildNumber
Creates a newSnapshotinstance using the specified buildNumber.- Parameters:
 buildNumber- the newintto use- Returns:
 - a 
Snapshotwith the specified buildNumber 
 - 
withLocalCopy
Creates a newSnapshotinstance using the specified localCopy.- Parameters:
 localCopy- the newbooleanto use- Returns:
 - a 
Snapshotwith the specified localCopy 
 - 
newInstance
Creates a newSnapshotinstance. Equivalent tonewInstance(true).- Returns:
 - a new 
Snapshot - See Also:
 
 - 
newInstance
Creates 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 
 - 
newBuilder
Creates a newSnapshotbuilder instance. Equivalent tonewBuilder(true).- Returns:
 - a new 
Builder - See Also:
 
 - 
newBuilder
Creates a newSnapshotbuilder instance using default values or not.- Parameters:
 withDefaults- the boolean indicating whether default values should be used- Returns:
 - a new 
Builder 
 - 
newBuilder
Creates a newSnapshotbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
 from- theSnapshotinstance to use as a basis- Returns:
 - a new 
Builder 
 - 
newBuilder
Creates a newSnapshotbuilder instance using the specified object as a basis.- Parameters:
 from- theSnapshotinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
 - a new 
Builder 
 
 -