Package jenkins.scm.api
Class SCMRevision
- java.lang.Object
-
- jenkins.scm.api.SCMRevision
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ChangeRequestSCMRevision
@ExportedBean public abstract class SCMRevision extends Object implements Serializable
Base class that represents a specific (or not so specific) revision of aSCMHead
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SCMRevision(SCMHead head)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
equals(Object obj)
SCMHead
getHead()
Returns theSCMHead
that thisSCMRevision
belongs to.abstract int
hashCode()
boolean
isDeterministic()
Returnstrue
if and only if this revision is deterministic, in other words that repeated checkouts of this revision will result in the exact same files being checked out.String
toString()
Should provide a concise, human-readable summary of this revision in an implementation-dependent format.
-
-
-
Constructor Detail
-
SCMRevision
protected SCMRevision(@NonNull SCMHead head)
Constructor.- Parameters:
head
- theSCMHead
that theSCMRevision
belongs to.
-
-
Method Detail
-
toString
public String toString()
Should provide a concise, human-readable summary of this revision in an implementation-dependent format.
-
isDeterministic
@Exported public boolean isDeterministic()
Returnstrue
if and only if this revision is deterministic, in other words that repeated checkouts of this revision will result in the exact same files being checked out. Most modern SCM systems have a deterministic revision, however some of the older ones do not have a deterministic revision for all types of head.- Returns:
true
if and only if this revision is deterministic.
-
getHead
@Exported @NonNull public final SCMHead getHead()
Returns theSCMHead
that thisSCMRevision
belongs to.- Returns:
- the
SCMHead
that thisSCMRevision
belongs to.
-
-