Class UserTuneElement.Builder
java.lang.Object
org.jivesoftware.smackx.usertune.element.UserTuneElement.Builder
- Enclosing class:
- UserTuneElement
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 Summary
Modifier and TypeMethodDescriptionbuild()
This method is called to build a UserTuneElement.Artist is an optional element in UserTuneElement.setLength
(int length) Length is an optional element in UserTuneElement.Length is an optional element in UserTuneElement.setRating
(int rating) Rating is an optional element in UserTuneElement.Source is an optional element in UserTuneElement.Title is an optional element in UserTuneElement.Track is an optional element in UserTuneElement.URI is an optional element in UserTuneElement.
-
Method Details
-
setArtist
Artist is an optional element in UserTuneElement.- Parameters:
artist
- the artist.- Returns:
- a reference to this builder.
-
setLength
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
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.
-