Class UserTuneElement.Builder

  • Enclosing class:
    UserTuneElement

    public static final class UserTuneElement.Builder
    extends Object
    This class defines a Builder class for UserTuneElement.
    UserTuneElement instance can be obtained using the build() method as follows.

     
     UserTuneElement.Builder builder = UserTuneElement.getBuilder();
     builder.setSource("Yessongs");
     builder.setTitle("Heart of the Sunrise");
     UserTuneElement userTuneElement = builder.build();
     
     
    Values such as title, source, artist, length, source, track and uri can be set using their respective setters through UserTuneElement.Builder.
    • Method Detail

      • setArtist

        public UserTuneElement.Builder setArtist​(String artist)
        Artist is an optional element in UserTuneElement.
        Parameters:
        artist - the artist.
        Returns:
        a reference to this builder.
      • setLength

        public UserTuneElement.Builder setLength​(int length)
        Length is an optional element in UserTuneElement.
        Parameters:
        length - the length.
        Returns:
        a reference to this builder.
      • setLength

        public UserTuneElement.Builder setLength​(UInt16 length)
        Length is an optional element in UserTuneElement.
        Parameters:
        length - the length.
        Returns:
        a reference to this builder.
      • setRating

        public UserTuneElement.Builder setRating​(int rating)
        Rating is an optional element in UserTuneElement.
        Parameters:
        rating - the rating.
        Returns:
        a reference to this builder.
      • setSource

        public UserTuneElement.Builder setSource​(String source)
        Source is an optional element in UserTuneElement.
        Parameters:
        source - the source.
        Returns:
        a reference to this builder.
      • setTitle

        public UserTuneElement.Builder setTitle​(String title)
        Title is an optional element in UserTuneElement.
        Parameters:
        title - the title.
        Returns:
        a reference to this builder.
      • setTrack

        public UserTuneElement.Builder setTrack​(String track)
        Track is an optional element in UserTuneElement.
        Parameters:
        track - the track.
        Returns:
        a reference to this builder.
      • setUri

        public UserTuneElement.Builder setUri​(URI uri)
        URI is an optional element in UserTuneElement.
        Parameters:
        uri - the URI.
        Returns:
        a reference to this builder.
      • build

        public UserTuneElement build()
        This method is called to build a UserTuneElement.
        Returns:
        UserTuneElement.