public class SphereBranchImpl extends java.lang.Object implements SphereBranch
| Modifier | Constructor and Description |
|---|---|
protected |
SphereBranchImpl(org.chronos.chronograph.api.branch.GraphBranch backingBranch,
SphereBranch origin) |
| Modifier and Type | Method and Description |
|---|---|
static SphereBranchImpl |
createBranch(org.chronos.chronograph.api.branch.GraphBranch backingBranch,
SphereBranch origin) |
static SphereBranchImpl |
createMasterBranch(org.chronos.chronograph.api.branch.GraphBranch backingMasterBranch) |
boolean |
equals(java.lang.Object obj) |
long |
getBranchingTimestamp()
Returns the timestamp at which this branch was created from the origin (parent) branch.
|
java.lang.String |
getName()
Returns the name of this branch, which also acts as its unique identifier.
|
long |
getNow()
Returns the "now" timestamp on this branch, i.e. the timestamp at which the last full commit was successfully
executed.
|
SphereBranch |
getOrigin()
Returns the branch from which this branch originates.
|
java.util.List<SphereBranch> |
getOriginsRecursive()
Returns the list of direct and transitive origin branches.
|
int |
hashCode() |
protected SphereBranchImpl(org.chronos.chronograph.api.branch.GraphBranch backingBranch,
SphereBranch origin)
public static SphereBranchImpl createMasterBranch(org.chronos.chronograph.api.branch.GraphBranch backingMasterBranch)
public static SphereBranchImpl createBranch(org.chronos.chronograph.api.branch.GraphBranch backingBranch, SphereBranch origin)
public java.lang.String getName()
SphereBranchgetName in interface SphereBranchnull. Branch names are unique.public SphereBranch getOrigin()
SphereBranchgetOrigin in interface SphereBranchnull if this branch is the master branch.public long getBranchingTimestamp()
SphereBranchgetBranchingTimestamp in interface SphereBranchpublic java.util.List<SphereBranch> getOriginsRecursive()
SphereBranch
The first entry in the list will always be the master branch.
The remaining entries are the descendants of the previous branch in the list which are also direct or transitive
origins of the current branch.
For example, if there were the following branching actions:
C.getOriginsRecursive() is invoked, then the returned list will consist of
[master, A, B] (in exactly this order).getOriginsRecursive in interface SphereBranchnull. The returned list is a calculated object which may
freely be modified without changing any internal state.public long getNow()
SphereBranchgetNow in interface SphereBranchpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object