Package org.vx68k.bitbucket.api.client
Class BitbucketClientBranch
- java.lang.Object
-
- org.vx68k.bitbucket.api.client.BitbucketClientObject
-
- org.vx68k.bitbucket.api.client.BitbucketClientRef
-
- org.vx68k.bitbucket.api.client.BitbucketClientBranch
-
- All Implemented Interfaces:
BitbucketBranch
,BitbucketRef
public class BitbucketClientBranch extends BitbucketClientRef implements BitbucketBranch
Client implementation ofBitbucketBranch
. This class represents a branch or bookmark by a JSON object.- Since:
- 5.0
- Author:
- Kaz Nishimura
-
-
Field Summary
-
Fields inherited from interface org.vx68k.bitbucket.api.BitbucketRef
BOOKMARK, BRANCH, NAMED_BRANCH
-
-
Constructor Summary
Constructors Constructor Description BitbucketClientBranch(JsonObject jsonObject)
Initializes the object.BitbucketClientBranch(JsonObject jsonObject, BitbucketClient bitbucketClient)
Initializes the object with a Bitbucket API client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<BitbucketClientCommit>
getHeads()
Returns the heads of this branch.protected static List<BitbucketClientCommit>
parseCommits(JsonArray commitsArray)
Parses a JSON array for commits.-
Methods inherited from class org.vx68k.bitbucket.api.client.BitbucketClientRef
getName, getTarget
-
Methods inherited from class org.vx68k.bitbucket.api.client.BitbucketClientObject
equals, getBitbucketClient, getJsonObject, getLink, getType, hashCode, setBitbucketClient, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.vx68k.bitbucket.api.BitbucketRef
getName, getTarget, getType
-
-
-
-
Constructor Detail
-
BitbucketClientBranch
public BitbucketClientBranch(JsonObject jsonObject)
Initializes the object.- Parameters:
jsonObject
- a JSON object
-
BitbucketClientBranch
public BitbucketClientBranch(JsonObject jsonObject, BitbucketClient bitbucketClient)
Initializes the object with a Bitbucket API client.- Parameters:
jsonObject
- a JSON objectbitbucketClient
- a Bitbucket API client
-
-
Method Detail
-
parseCommits
protected static List<BitbucketClientCommit> parseCommits(JsonArray commitsArray)
Parses a JSON array for commits.- Parameters:
commitsArray
- JSON array of commits- Returns:
- list of commits
-
getHeads
public final List<BitbucketClientCommit> getHeads()
Returns the heads of this branch.- Returns:
- the heads
-
-