Package pl.project13.core
Class AheadBehind
- java.lang.Object
-
- pl.project13.core.AheadBehind
-
public class AheadBehind extends java.lang.ObjectA local git repository can either be "ahead", or "behind" in the number of commits relative to the remote repository. This class tracks the amount of commits the local git repository is "behind", or "ahead" relative to it's remote. :warning: You must set theoffline-setting of the plugin tofalsewhen you want to ensure that the properties generated are truly up-to-date. Otherwise the local state of the git repository is used which might be out-of-date.
-
-
Field Summary
Fields Modifier and Type Field Description static AheadBehindNO_REMOTEIndication that we could not find a remote repository to calculate a "behind", or "ahead" relation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringahead()java.lang.Stringbehind()booleanequals(java.lang.Object obj)inthashCode()static AheadBehindof(int ahead, int behind)Constructor for a "AheadBehind"-object.static AheadBehindof(java.lang.String ahead, java.lang.String behind)Constructor for a "AheadBehind"-object.
-
-
-
Field Detail
-
NO_REMOTE
public static final AheadBehind NO_REMOTE
Indication that we could not find a remote repository to calculate a "behind", or "ahead" relation.
-
-
Method Detail
-
of
public static AheadBehind of(int ahead, int behind)
Constructor for a "AheadBehind"-object.- Parameters:
ahead- Number of commits the local repository is "ahead" in relation to it's remote.behind- Number of commits the local repository is "behind" in relation to it's remote.- Returns:
- a "AheadBehind"-object.
-
of
public static AheadBehind of(java.lang.String ahead, java.lang.String behind)
Constructor for a "AheadBehind"-object.- Parameters:
ahead- Number of commits the local repository is "ahead" in relation to it's remote.behind- Number of commits the local repository is "behind" in relation to it's remote.- Returns:
- a "AheadBehind"-object.
-
ahead
public java.lang.String ahead()
- Returns:
- Number of commits the local repository is "ahead" in relation to it's remote.
-
behind
public java.lang.String behind()
- Returns:
- Number of commits the local repository is "behind" in relation to it's remote.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-