public class Tag extends Object implements Comparable<Tag>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Tag o) |
static List<Tag> |
filter(Collection<Tag> tags,
double percentage)
Filters tags from the given list; retains only those tags with a count
higher than the given percentage of the total sum as from
getTagCountSum(Collection) . |
int |
getCount() |
static Tag |
getInfo(String tag,
Locale locale,
String apiKey)
Gets the metadata for a tag.
|
static Tag |
getInfo(String tag,
String apiKey)
Gets the metadata for a tag.
|
String |
getName() |
int |
getReach() |
static Collection<Tag> |
getSimilar(String tag,
String apiKey)
Search for tags similar to this one.
|
static long |
getTagCountSum(Collection<Tag> tags)
Returns the sum of all
count elements in the results. |
int |
getTaggings()
Returns the number of taggings of this specific tag.
|
static Collection<Album> |
getTopAlbums(String tag,
String apiKey) |
static Collection<Artist> |
getTopArtists(String tag,
String apiKey) |
static Collection<Tag> |
getTopTags(String apiKey) |
static Collection<Track> |
getTopTracks(String tag,
String apiKey) |
String |
getUrl() |
static Chart<Artist> |
getWeeklyArtistChart(String tag,
int limit,
String apiKey) |
static Chart<Artist> |
getWeeklyArtistChart(String tag,
String apiKey) |
static Chart<Artist> |
getWeeklyArtistChart(String tag,
String from,
String to,
int limit,
String apiKey) |
static LinkedHashMap<String,String> |
getWeeklyChartList(String tag,
String apiKey) |
static Collection<Chart> |
getWeeklyChartListAsCharts(String tag,
String apiKey) |
Date |
getWikiLastChanged() |
String |
getWikiSummary() |
String |
getWikiText() |
boolean |
isStreamable() |
static Collection<Tag> |
search(String tag,
int limit,
String apiKey) |
static Collection<Tag> |
search(String tag,
String apiKey) |
public int getCount()
public int getTaggings()
getCount()
.getInfo(String, String)
public String getName()
public String getUrl()
public boolean isStreamable()
public int getReach()
public Date getWikiLastChanged()
public String getWikiSummary()
public String getWikiText()
public static long getTagCountSum(Collection<Tag> tags)
count
elements in the results.tags
- a list of tagspublic static List<Tag> filter(Collection<Tag> tags, double percentage)
getTagCountSum(Collection)
.tags
- list of tagspercentage
- cut off percentagepublic static Collection<Tag> getSimilar(String tag, String apiKey)
tag
- The tag nameapiKey
- A Last.fm API keyTag
spublic static Collection<Tag> getTopTags(String apiKey)
public static Collection<Album> getTopAlbums(String tag, String apiKey)
public static Collection<Track> getTopTracks(String tag, String apiKey)
public static Collection<Artist> getTopArtists(String tag, String apiKey)
public static Collection<Tag> search(String tag, String apiKey)
public static Collection<Tag> search(String tag, int limit, String apiKey)
public static Chart<Artist> getWeeklyArtistChart(String tag, int limit, String apiKey)
public static Chart<Artist> getWeeklyArtistChart(String tag, String from, String to, int limit, String apiKey)
public static LinkedHashMap<String,String> getWeeklyChartList(String tag, String apiKey)
public static Collection<Chart> getWeeklyChartListAsCharts(String tag, String apiKey)
public static Tag getInfo(String tag, String apiKey)
tag
- The tag nameapiKey
- A Last.fm API keypublic static Tag getInfo(String tag, Locale locale, String apiKey)
tag
- The tag namelocale
- The language to fetch info in, or null
apiKey
- A Last.fm API keypublic int compareTo(Tag o)
compareTo
in interface Comparable<Tag>