Package com.day.cq.tagging
Class TagCloud
java.lang.Object
com.day.cq.tagging.TagCloud
TagCloud helps displaying a tag cloud with n-tile font sizes.-
Constructor Summary
ConstructorsConstructorDescriptionTagCloud(TagManager tagManager) Deprecated.TagCloud(TagManager tagManager, Resource resource) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionintcalculateNtiles(long tagCount, int n) Calculates the n-tiles (eg.static intcalculateNtiles(long frequency, long[] frequencies, int n) Calculates the n-tiles (eg.Tag[]getTags()booleanisEmpty()
-
Constructor Details
-
TagCloud
-
TagCloud
-
TagCloud
Deprecated. -
TagCloud
Deprecated.
-
-
Method Details
-
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
-