Class Commit
java.lang.Object
com.mooltiverse.oss.nyx.entities.git.Commit
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Commit>
This object is a Git commit value holder independent from the underlying Git implementation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns the author data.Returns the committer data.intgetDate()Returns the commit date.Returns the commit message.Returns the immutable list of parent commit SHA-1 identifiers.getSHA()Returns the SHA-1 identifier for the commit.getTags()Returns the immutable list of tags pointing to this commit.inthashCode()toString()
-
Constructor Details
-
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 benulldate- the commit dateparents- the SHA-1 identifiers of parent commits. If the commit has no parents an empty, nonnulllist, must be passedauthorAction- the value holder about the author. Cannot benullcommitAction- the value holder about the committer. Cannot benullmessage- the commit message. Cannot benulltags- the tags applied to this commit. If the commit has no tags an empty, nonnullset, must be passed
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Commit>
-
getAuthorAction
Returns the author data.- Returns:
- the author data. Never
null.
-
getCommitAction
Returns the committer data.- Returns:
- the committer data. Never
null.
-
getDate
public int getDate()Returns the commit date.- Returns:
- the commit date.
-
getMessage
Returns the commit message.- Returns:
- the commit message. Never
null.
-
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
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
Returns the SHA-1 identifier for the commit.- Returns:
- the SHA-1 identifier for the commit. Never
null.
-
toString
-