Package hudson.plugins.git
Class Branch
- java.lang.Object
-
- hudson.plugins.git.GitObject
-
- hudson.plugins.git.Branch
-
- All Implemented Interfaces:
Serializable
public class Branch extends GitObject
Represents a git branch.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for the object.String
toString()
Returns branch name and SHA1 hash.-
Methods inherited from class hudson.plugins.git.GitObject
getName, getSHA1, getSHA1String
-
-
-
-
Constructor Detail
-
Branch
public Branch(String name, org.eclipse.jgit.lib.ObjectId sha1)
Constructor for Branch.- Parameters:
name
- branch namesha1
- object ID to which branch name points
-
Branch
public Branch(org.eclipse.jgit.lib.Ref candidate)
Constructor for Branch.- Parameters:
candidate
- reference to which branch points (or should point)
-
-
Method Detail
-
toString
public String toString()
Returns branch name and SHA1 hash.
-
hashCode
public int hashCode()
Returns a hash code value for the object. Considers sha1 and name in the calculation.
-
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.
-
-