Class UserTuneElement.Builder

java.lang.Object
org.jivesoftware.smackx.usertune.element.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 Details

    • setArtist

      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

      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

      Source is an optional element in UserTuneElement.
      Parameters:
      source - the source.
      Returns:
      a reference to this builder.
    • setTitle

      Title is an optional element in UserTuneElement.
      Parameters:
      title - the title.
      Returns:
      a reference to this builder.
    • setTrack

      Track is an optional element in UserTuneElement.
      Parameters:
      track - the track.
      Returns:
      a reference to this builder.
    • setUri

      URI is an optional element in UserTuneElement.
      Parameters:
      uri - the URI.
      Returns:
      a reference to this builder.
    • build

      This method is called to build a UserTuneElement.
      Returns:
      UserTuneElement.