Package com.day.cq.tagging
Class TagCloud
- java.lang.Object
-
- com.day.cq.tagging.TagCloud
-
public class TagCloud extends Object
TagCloud
helps displaying a tag cloud with n-tile font sizes.
-
-
Constructor Summary
Constructors Constructor Description TagCloud(Tag[] tags)
TagCloud(Tag[] tags, Locale locale)
TagCloud(TagManager tagManager)
Deprecated.TagCloud(TagManager tagManager, Resource resource)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calculateNtiles(long tagCount, int n)
Calculates the n-tiles (eg.static int
calculateNtiles(long frequency, long[] frequencies, int n)
Calculates the n-tiles (eg.Tag[]
getTags()
boolean
isEmpty()
-
-
-
Constructor Detail
-
TagCloud
public TagCloud(Tag[] tags)
-
TagCloud
@Deprecated public TagCloud(TagManager tagManager)
Deprecated.
-
TagCloud
@Deprecated public TagCloud(TagManager tagManager, Resource resource)
Deprecated.
-
-
Method Detail
-
getTags
public Tag[] getTags()
-
isEmpty
public boolean isEmpty()
-
calculateNtiles
public int calculateNtiles(long tagCount, int n)
Calculates the n-tiles (eg. dectiles for n=10) for a specific frequency / tag count, and using the frequency set of the tags in this cloud.- Parameters:
tagCount
- the tagCount for which to calculate the resultn
- how many tiles the resulting value should have- Returns:
- a value between 1 and n, the n-tile
-
calculateNtiles
public static int calculateNtiles(long frequency, long[] frequencies, int n)
Calculates the n-tiles (eg. dectiles for n=10) for a specific frequency.- Parameters:
frequency
- the frequency for which to calculate the resultfrequencies
- a list of all frequenciesn
- how many tiles the resulting value should have- Returns:
- a value between 1 and n, the n-tile
-
-