Class AbstractModelObject

java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
All Implemented Interfaces:
Serializable, IModelObject
Direct Known Subclasses:
Actions, Album, AlbumSimplified, AlbumSimplifiedSpecial, Artist, ArtistSimplified, AudioAnalysis, AudioAnalysisMeasure, AudioAnalysisMeta, AudioAnalysisSection, AudioAnalysisSegment, AudioAnalysisTrack, Audiobook, AudiobookSimplified, AudioFeatures, AuthenticationError, Author, AuthorizationCodeCredentials, Category, Chapter, ChapterRestriction, ChapterSimplified, ClientCredentials, Context, Copyright, CurrentlyPlaying, CurrentlyPlayingContext, Cursor, Device, Disallows, Episode, EpisodeSimplified, Error, ExplicitContentSettings, ExternalId, ExternalUrl, FeaturedPlaylists, Followers, Image, Narrator, Paging, PagingCursorbased, PlaybackQueue, PlayHistory, Playlist, PlaylistSimplified, PlaylistTrack, PlaylistTracksInformation, Recommendations, RecommendationsSeed, Restrictions, ResumePoint, SavedAlbum, SavedEpisode, SavedShow, SavedTrack, SearchResult, Show, ShowSimplified, SnapshotResult, Track, TrackLink, TrackSimplified, User

public abstract class AbstractModelObject extends Object implements IModelObject
The base class of every model object, with the builder each of them implements.

Model objects are read from JSON by the library itself; to read JSON obtained some other way, use ModelObjects.

See Also:
  • Constructor Details

    • AbstractModelObject

      protected AbstractModelObject(AbstractModelObject.Builder builder)
      This constructor initializes the time zone.
      Parameters:
      builder - The builder object of the corresponding model object.
  • Method Details

    • toString

      public abstract String toString()
      Returns a String representation of this model object in the style:

      ModelObject(attr1=value1, attr2=value2, ...)

      Overrides:
      toString in class Object