Class PlayHistory.Builder

java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.PlayHistory.Builder
All Implemented Interfaces:
IModelObject.Builder
Enclosing class:
PlayHistory

public static final class PlayHistory.Builder extends AbstractModelObject.Builder
Builder class for building PlayHistory instances.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setTrack

      public PlayHistory.Builder setTrack(Track track)
      The track setter.
      Parameters:
      track - The track the user listened to.
      Returns:
      A PlayHistory.Builder.
    • setPlayedAt

      public PlayHistory.Builder setPlayedAt(Date playedAt)
      The played at date setter.
      Parameters:
      playedAt - The date and time the track was played.
      Returns:
      A PlayHistory.Builder.
    • setContext

      public PlayHistory.Builder setContext(Context context)
      The context setter.
      Parameters:
      context - The context the track was played from.
      Returns:
      A PlayHistory.Builder.
    • build

      public PlayHistory build()
      Description copied from interface: IModelObject.Builder
      Build a model object with the information set in the builder object.
      The type of the model object and its methods depend on its corresponding implementation.
      Returns:
      A model object.