Record Class TrackingInfo
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.TrackingInfo
- Record Components:
upstream- short name of the upstream branch, e.g.origin/mainahead- commits only on the local branch (to push)behind- commits only on the upstream branch (to pull)
How the current branch relates to its upstream branch.
-
Constructor Summary
ConstructorsConstructorDescriptionTrackingInfo(String upstream, int ahead, int behind) Creates an instance of aTrackingInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionintahead()Returns the value of theaheadrecord component.intbehind()Returns the value of thebehindrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.upstream()Returns the value of theupstreamrecord component.
-
Constructor Details
-
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 '=='. -
upstream
Returns the value of theupstreamrecord component.- Returns:
- the value of the
upstreamrecord component
-
ahead
public int ahead()Returns the value of theaheadrecord component.- Returns:
- the value of the
aheadrecord component
-
behind
public int behind()Returns the value of thebehindrecord component.- Returns:
- the value of the
behindrecord component
-