Package com.mooltiverse.oss.nyx.data
Class Commit
- java.lang.Object
-
- com.mooltiverse.oss.nyx.data.Commit
-
public class Commit extends Object
This object is a Git commit value holder independent from the underlying Git implementation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action
getAuthorAction()
Returns the author data.Action
getCommitAction()
Returns the committer data.int
getDate()
Returns the commit date.Message
getMessage()
Returns the commit message.List<String>
getParents()
Returns the immutable list of parent commit SHA-1 identifiers.String
getSHA()
Returns the SHA-1 identifier for the commit.Set<Tag>
getTags()
Returns the immutable list of tags pointing to this commit.String
toString()
-
-
-
Constructor Detail
-
Commit
public Commit(String sha, int date, List<String> parents, Action authorAction, Action commitAction, Message message, Set<Tag> tags)
Constructor.- Parameters:
sha
- the commit SHA-1 identifier. Cannot benull
date
- the commit dateparents
- the SHA-1 identifiers of parent commits. If the commit has no parents an empty, nonnull
list, must be passedauthorAction
- the value holder about the author. Cannot benull
commitAction
- the value holder about the committer. Cannot benull
message
- the commit message. Cannot benull
tags
- the tags applied to this commit. If the commit has no tags an empty, nonnull
set, must be passed
-
-
Method Detail
-
getAuthorAction
public Action getAuthorAction()
Returns the author data.- Returns:
- the author data. Never
null
.
-
getCommitAction
public Action getCommitAction()
Returns the committer data.- Returns:
- the committer data. Never
null
.
-
getDate
public int getDate()
Returns the commit date.- Returns:
- the commit date.
-
getMessage
public Message getMessage()
Returns the commit message.- Returns:
- the commit message. Never
null
.
-
getParents
public List<String> getParents()
Returns the immutable list of parent commit SHA-1 identifiers.- Returns:
- the immutable list of parent commit SHA-1 identifiers. May be empty but not
null
.
-
getTags
public Set<Tag> getTags()
Returns the immutable list of tags pointing to this commit.- Returns:
- the immutable list of tags pointing to this commit. May be empty but not
null
.
-
getSHA
public String getSHA()
Returns the SHA-1 identifier for the commit.- Returns:
- the SHA-1 identifier for the commit. Never
null
.
-
-