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 Details

  • Method Details

    • 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 result
      n - 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 result
      frequencies - a list of all frequencies
      n - how many tiles the resulting value should have
      Returns:
      a value between 1 and n, the n-tile