Package org.vx68k.bitbucket.api.client
Class BitbucketClientObject
- java.lang.Object
-
- org.vx68k.bitbucket.api.client.BitbucketClientObject
-
- Direct Known Subclasses:
BitbucketClientAccount
,BitbucketClientCommit
,BitbucketClientIssue
,BitbucketClientRef
,BitbucketClientRendered
,BitbucketClientRepository
,BitbucketEvent
,BitbucketPush
,BitbucketPush.Change
public class BitbucketClientObject extends Object
Common super object represented by a JSON object.- Since:
- 5.0
- Author:
- Kaz Nishimura
-
-
Constructor Summary
Constructors Constructor Description BitbucketClientObject(JsonObject jsonObject)
Initializes the object with a JSON object.BitbucketClientObject(JsonObject jsonObject, BitbucketClient bitbucketClient)
Initializes the object with a JSON object and a Bitbucket API client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
BitbucketClient
getBitbucketClient()
Returns theBitbucketClient
object.JsonObject
getJsonObject()
Returns the JSON object given to the constructor.Link
getLink(String name)
Returns the link of this object identified by a name.String
getType()
Returns the type name of this object.int
hashCode()
void
setBitbucketClient(BitbucketClient value)
Associates a Bitbucket client.String
toString()
Returns a string representation of the object.
-
-
-
Constructor Detail
-
BitbucketClientObject
public BitbucketClientObject(JsonObject jsonObject)
Initializes the object with a JSON object.- Parameters:
jsonObject
- a JSON object- Throws:
IllegalArgumentException
- ifobject
isnull
-
BitbucketClientObject
public BitbucketClientObject(JsonObject jsonObject, BitbucketClient bitbucketClient)
Initializes the object with a JSON object and a Bitbucket API client.- Parameters:
jsonObject
- a JSON objectbitbucketClient
- a Bitbucket API client- Throws:
IllegalArgumentException
- ifobject
isnull
-
-
Method Detail
-
getJsonObject
public final JsonObject getJsonObject()
Returns the JSON object given to the constructor.- Returns:
- the JSON object
-
getBitbucketClient
public final BitbucketClient getBitbucketClient()
Returns theBitbucketClient
object.- Returns:
- the
BitbucketClient
object
-
setBitbucketClient
public final void setBitbucketClient(BitbucketClient value)
Associates a Bitbucket client.- Parameters:
value
- Bitbucket client to associate, ornull
-
getType
public final String getType()
Returns the type name of this object.- Returns:
- the type name if it was specified in the JSON object;
null
otherwise
-
getLink
public final Link getLink(String name)
Returns the link of this object identified by a name.- Parameters:
name
- name of the link- Returns:
- the link if it was specified in the JSON object;
null
otherwise
-
toString
public String toString()
Returns a string representation of the object.This implementation just returns a string representation of the underlying JSON object. Subclasses may override this method to return other values.
-
-