public final class MusicItemUtil
extends java.lang.Object
MusicItem
的 title, artist, album 值。限定符和类型 | 类和说明 |
---|---|
static interface |
MusicItemUtil.GetUriFunction<T>
获取 URI 函数
|
限定符和类型 | 方法和说明 |
---|---|
static <T> java.lang.String |
generateToken(java.util.List<T> items,
MusicItemUtil.GetUriFunction<T> function) |
static java.lang.String |
getAlbum(android.content.Context context,
MusicItem musicItem)
获取歌曲的专辑,如果专辑为空,则返回字符串
"未知专辑" 。 |
static java.lang.String |
getAlbum(MusicItem musicItem,
java.lang.String defaultAlbum)
获取歌曲的专辑,如果专辑为空,则返回默认值。
|
static java.lang.String |
getArtist(android.content.Context context,
MusicItem musicItem)
获取歌曲的艺术家(歌手),如果艺术家为空,则返回字符串
"未知歌手" 。 |
static java.lang.String |
getArtist(MusicItem musicItem,
java.lang.String defaultArtist)
获取歌曲的艺术家(歌手),如果艺术家为空,则返回默认值。
|
static java.lang.String |
getTitle(android.content.Context context,
MusicItem musicItem)
获取歌曲的标题,如果标题为空,则返回字符串
"未知标题" 。 |
static java.lang.String |
getTitle(MusicItem musicItem,
java.lang.String defaultTitle)
获取歌曲的标题,如果标题为空,则返回默认值。
|
public static java.lang.String getTitle(@NonNull MusicItem musicItem, @NonNull java.lang.String defaultTitle)
public static java.lang.String getArtist(@NonNull MusicItem musicItem, @NonNull java.lang.String defaultArtist)
public static java.lang.String getAlbum(@NonNull MusicItem musicItem, @NonNull java.lang.String defaultAlbum)
public static java.lang.String getTitle(@NonNull android.content.Context context, @NonNull MusicItem musicItem)
"未知标题"
。public static java.lang.String getArtist(@NonNull android.content.Context context, @NonNull MusicItem musicItem)
"未知歌手"
。public static java.lang.String getAlbum(@NonNull android.content.Context context, @NonNull MusicItem musicItem)
"未知专辑"
。public static <T> java.lang.String generateToken(java.util.List<T> items, MusicItemUtil.GetUriFunction<T> function)