Class Tag

All Implemented Interfaces:
Serializable

public class Tag extends GitObject
Git tag including SHA1 and message of the associated commit.
See Also:
  • Field Details

    • commitSHA1

      public String commitSHA1
      SHA1 hash of the tagged commit
    • commitMessage

      public String commitMessage
      Commit message of the tagged commit
  • Constructor Details

    • Tag

      public Tag(String name, org.eclipse.jgit.lib.ObjectId sha1)
      Constructor for Tag.
      Parameters:
      name - a String object.
      sha1 - a ObjectId object.
  • Method Details

    • getCommitMessage

      public String getCommitMessage()
      Getter for the field commitMessage.
      Returns:
      a String object.
    • setCommitMessage

      public void setCommitMessage(String commitMessage)
      Setter for the field commitMessage.
      Parameters:
      commitMessage - a String object.
    • getCommitSHA1

      public String getCommitSHA1()
      Get the sha1 of the commit associated with this tag
      Returns:
      a String object.
    • setCommitSHA1

      public void setCommitSHA1(String commitSHA1)
      Setter for the field commitSHA1.
      Parameters:
      commitSHA1 - a String object.
    • hashCode

      public int hashCode()
      Returns a hash code value for the object. Considers sha1 and name in the calculation.
      Overrides:
      hashCode in class GitObject
      Returns:
      a hash code value for this object.
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one. Includes sha1 and name in the comparison. Objects of subclasses of this object are not equal to objects of this class, even if they add no fields.
      Overrides:
      equals in class GitObject
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise