Interface IModelObject.IJsonUtil<T>
- Type Parameters:
T
- Type of the corresponding model object.
- All Known Implementing Classes:
AbstractModelObject.JsonUtil
,Actions.JsonUtil
,Album.JsonUtil
,AlbumSimplified.JsonUtil
,AlbumSimplifiedSpecial.JsonUtil
,Artist.JsonUtil
,ArtistSimplified.JsonUtil
,AudioAnalysis.JsonUtil
,AudioAnalysisMeasure.JsonUtil
,AudioAnalysisMeta.JsonUtil
,AudioAnalysisSection.JsonUtil
,AudioAnalysisSegment.JsonUtil
,AudioAnalysisTrack.JsonUtil
,AudioFeatures.JsonUtil
,AuthenticationError.JsonUtil
,AuthorizationCodeCredentials.JsonUtil
,Category.JsonUtil
,ClientCredentials.JsonUtil
,Context.JsonUtil
,Copyright.JsonUtil
,CurrentlyPlaying.JsonUtil
,CurrentlyPlayingContext.JsonUtil
,Cursor.JsonUtil
,Device.JsonUtil
,Disallows.JsonUtil
,Episode.JsonUtil
,EpisodeSimplified.JsonUtil
,Error.JsonUtil
,ExternalId.JsonUtil
,ExternalUrl.JsonUtil
,FeaturedPlaylists.JsonUtil
,Followers.JsonUtil
,Image.JsonUtil
,Paging.JsonUtil
,PagingCursorbased.JsonUtil
,PlaybackQueue.JsonUtil
,PlayHistory.JsonUtil
,Playlist.JsonUtil
,PlaylistSimplified.JsonUtil
,PlaylistTrack.JsonUtil
,PlaylistTrackPosition.JsonUtil
,PlaylistTracksInformation.JsonUtil
,Recommendations.JsonUtil
,RecommendationsSeed.JsonUtil
,Restrictions.JsonUtil
,ResumePoint.JsonUtil
,SavedAlbum.JsonUtil
,SavedEpisode.JsonUtil
,SavedShow.JsonUtil
,SavedTrack.JsonUtil
,SearchResult.JsonUtil
,Show.JsonUtil
,ShowSimplified.JsonUtil
,SnapshotResult.JsonUtil
,Track.JsonUtil
,TrackLink.JsonUtil
,TrackSimplified.JsonUtil
,User.JsonUtil
- Enclosing interface:
IModelObject
public static interface IModelObject.IJsonUtil<T>
Interface with methods used in JsonUtil classes of model objects.
-
Method Summary
Modifier and TypeMethodDescriptioncreateModelObject
(com.google.gson.JsonObject jsonObject) Build a model object with the information given in a json object.createModelObject
(String json) Build a model object with the information given in a json string.T[]
createModelObjectArray
(com.google.gson.JsonArray jsonArray) Create an array of model objects out of a json array object.<X> X[]
createModelObjectArray
(com.google.gson.JsonArray jsonArray, Class<X> clazz) Create an array of model objects out of a json array object and aClass
object.T[]
createModelObjectArray
(String json) Create an array of model objects out of a json string.T[]
createModelObjectArray
(String json, String key) Create an array of model objects out of a json array, which is contained in a json object.createModelObjectPaging
(com.google.gson.JsonObject jsonObject) Create a paging of model objects out of a json object.Create a paging of model objects out of a json string.createModelObjectPaging
(String json, String key) Create a paging of model objects out of a json array, which is contained in a json object.createModelObjectPagingCursorbased
(com.google.gson.JsonObject jsonObject) Create a cursor-based paging of model objects out of a json object.Create a cursor-based paging of model objects out of a json string.createModelObjectPagingCursorbased
(String json, String key) Create a cursor-based paging of model objects out of a json array, which is contained in a json object.boolean
hasAndNotNull
(com.google.gson.JsonObject jsonObject, String memberName) Check whether the supplied JSON object contains data in the given member, which is notnull
.
-
Method Details
-
hasAndNotNull
Check whether the supplied JSON object contains data in the given member, which is notnull
.- Parameters:
jsonObject
- The JSON object.memberName
- The member name.- Returns:
- Whether the supplied JSON object contains data in the given member.
-
createModelObject
Build a model object with the information given in a json object.
The type of the model object and its methods depend on its corresponding implementation.- Parameters:
jsonObject
- A json object.- Returns:
- A model object. The type depends on this methods implementation.
-
createModelObject
Build a model object with the information given in a json string.
The type of the model object and its methods depend on its corresponding implementation.- Parameters:
json
- A json object.- Returns:
- A model object. The type depends on this methods implementation.
-
createModelObjectArray
Create an array of model objects out of a json array object.- Parameters:
jsonArray
- AJsonArray
.- Returns:
- A model object array. The type depends on this methods implementation.
-
createModelObjectArray
Create an array of model objects out of a json string.- Parameters:
json
- AJsonArray
.- Returns:
- A model object array. The type depends on this methods implementation.
-
createModelObjectArray
Create an array of model objects out of a json array, which is contained in a json object.- Parameters:
json
- AJsonObject
.key
- The key of the json array in the json object.- Returns:
- A model object array. The type depends on this methods implementation.
-
createModelObjectArray
Create an array of model objects out of a json array object and aClass
object.- Type Parameters:
X
- The model object type of the array and class object.- Parameters:
jsonArray
- A json array object.clazz
- The class object.- Returns:
- A model object array.
-
createModelObjectPaging
Create a paging of model objects out of a json object.- Parameters:
jsonObject
- A json object.- Returns:
- A model object paging.
-
createModelObjectPaging
Create a paging of model objects out of a json string.- Parameters:
json
- A json string.- Returns:
- A model object paging.
-
createModelObjectPaging
Create a paging of model objects out of a json array, which is contained in a json object.- Parameters:
json
- AJsonObject
.key
- The key of the json array in the json object.- Returns:
- A model object array. The type depends on this methods implementation.
-
createModelObjectPagingCursorbased
Create a cursor-based paging of model objects out of a json object.- Parameters:
jsonObject
- A json object.- Returns:
- A cursor-based model object paging.
-
createModelObjectPagingCursorbased
Create a cursor-based paging of model objects out of a json string.- Parameters:
json
- A json string.- Returns:
- A cursor-based model object paging.
-
createModelObjectPagingCursorbased
Create a cursor-based paging of model objects out of a json array, which is contained in a json object.- Parameters:
json
- AJsonObject
.key
- The key of the json array in the json object.- Returns:
- A cursor-based model object paging.
-