Record Class BranchInfo
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.BranchInfo
- Record Components:
name- short name, e.g.developororigin/developfullName- full ref name, e.g.refs/heads/developremote-truefor remote-tracking branchescurrent-trueif this is the checked-out branchcommitId- id of the commit the branch points to
public record BranchInfo(String name, String fullName, boolean remote, boolean current, String commitId)
extends Record
A branch.
-
Constructor Summary
ConstructorsConstructorDescriptionBranchInfo(String name, String fullName, boolean remote, boolean current, String commitId) Creates an instance of aBranchInforecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommitId()Returns the value of thecommitIdrecord component.booleancurrent()Returns the value of thecurrentrecord component.final booleanIndicates whether some other object is "equal to" this one.fullName()Returns the value of thefullNamerecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleanremote()Returns the value of theremoterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BranchInfo
Creates an instance of aBranchInforecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
fullName
Returns the value of thefullNamerecord component.- Returns:
- the value of the
fullNamerecord component
-
remote
public boolean remote()Returns the value of theremoterecord component.- Returns:
- the value of the
remoterecord component
-
current
public boolean current()Returns the value of thecurrentrecord component.- Returns:
- the value of the
currentrecord component
-
commitId
Returns the value of thecommitIdrecord component.- Returns:
- the value of the
commitIdrecord component
-