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 booleanequals(Object object)BitbucketClientgetBitbucketClient()Returns theBitbucketClientobject.JsonObjectgetJsonObject()Returns the JSON object given to the constructor.LinkgetLink(String name)Returns the link of this object identified by a name.StringgetType()Returns the type name of this object.inthashCode()voidsetBitbucketClient(BitbucketClient value)Associates a Bitbucket client.StringtoString()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- ifobjectisnull
-
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- ifobjectisnull
-
-
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 theBitbucketClientobject.- Returns:
- the
BitbucketClientobject
-
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;
nullotherwise
-
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;
nullotherwise
-
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.
-
-