Class DescribeFrequencyMap<T extends Comparable<T>>

Object
com.owenfeehan.pathpatternfinder.describer.frequencymap.DescribeFrequencyMap<T>
Type Parameters:
T - element-type in frequency-map

public class DescribeFrequencyMap<T extends Comparable<T>>
extends Object
Describes the contents of a frequency-map with user-friendly strings containing examples.
Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • numberUniqueValues

      public int numberUniqueValues()
      How many unique-values are described in the FrequencyMap?
      Returns:
      a count of the unique-values
    • canDescribeAllWithin

      public boolean canDescribeAllWithin​(int width, int seperatorNumberChars)
      Can all values be described within a certain width?
      Parameters:
      width - the maximum number-of-characters that values need to be described within
      seperatorNumberChars - the number of characters in the separator that is used between elements
      Returns:
      true if all values can be described within width number of characters
    • describeAllWithin

      public String describeAllWithin​(int width, String prefix, String separator)
      Describe all elements in the frequency-map in a string that must have maximum width number of characters.
      Parameters:
      width - the maximum number-of-characters that values need to be described within.
      prefix - a string to include immediately before the rest of the description
      separator - a string to place between each element that is described
      Returns:
      the summary string