Class SimpleCommit

java.lang.Object
com.atlassian.bitbucket.commit.SimpleMinimalCommit
com.atlassian.bitbucket.commit.SimpleCommit
All Implemented Interfaces:
Commit, MinimalCommit, PropertySupport, Serializable

public class SimpleCommit extends SimpleMinimalCommit implements Commit, Serializable
See Also:
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class SimpleMinimalCommit
    • getAuthor

      @Nonnull public Person getAuthor()
      Specified by:
      getAuthor in interface Commit
      Returns:
      the person who authored the changes
    • getAuthorTimestamp

      @Nonnull public Date getAuthorTimestamp()
      Specified by:
      getAuthorTimestamp in interface Commit
      Returns:
      the timestamp when the changes were authored
    • getCommitter

      @Nonnull public Person getCommitter()
      Specified by:
      getCommitter in interface Commit
      Returns:
      the person who committed the changes
    • getCommitterTimestamp

      @Nonnull public Date getCommitterTimestamp()
      Specified by:
      getCommitterTimestamp in interface Commit
      Returns:
      the timestamp when the changes were committed
    • getMessage

      public String getMessage()
      Specified by:
      getMessage in interface Commit
      Returns:
      the commit message
    • getParents

      @Nonnull public List<MinimalCommit> getParents()
      Specified by:
      getParents in interface Commit
      Returns:
      the commit's parents, which may be empty for the initial commit to a repository but will never be null
    • getProperties

      @Nonnull public PropertyMap getProperties()
      Specified by:
      getProperties in interface PropertySupport
      Returns:
      the properties associated with this object
    • getRepository

      public Repository getRepository()
      Description copied from interface: Commit
      Retrieves the repository this commit was loaded from, if it's available.

      Note: For reasons of performance and conciseness this field may be null depending on the service used to construct this commit. If an explicit repository context has been provided by some other mechanism (for example, web-fragments on the commit page will have an explicit 'repository' object in their render context) it is preferable to use that instead of this.

      Specified by:
      getRepository in interface Commit
      Returns:
      the repository that this commit belongs to
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class SimpleMinimalCommit
    • setProperties

      public void setProperties(@Nonnull PropertyMap properties)
    • setRepository

      public void setRepository(Repository repository)
    • toString

      public String toString()
      Overrides:
      toString in class SimpleMinimalCommit