Class BaseMeasureBuilder

java.lang.Object
com.activeviam.builders.BaseMeasureBuilder

public class BaseMeasureBuilder extends Object
Partial builder for all attributes contained in IMeasureMemberDescription.
  • Constructor Details

    • BaseMeasureBuilder

      public BaseMeasureBuilder(String name)
      Constructor to start building a measure.
      Parameters:
      name - The measure name.
    • BaseMeasureBuilder

      public BaseMeasureBuilder(String name, boolean visible, String folder, String measureGroups, String formatter)
      Constructor for build steps.
      Parameters:
      name - The measure name.
      visible - If this measure should be visible or not.
      folder - The measure folder.
      measureGroups - The measure group.
      formatter - The measure formatter.
  • Method Details

    • applyParametersToMeasureDescription

      public void applyParametersToMeasureDescription(IMeasureMemberDescription target)
      Mutates a measure description to apply all the changes collected by this builder.
      Parameters:
      target - The measure description to mutate.
    • withVisibility

      public BaseMeasureBuilder withVisibility(boolean visibility)
      Changes the visibility of the created measure.
      Parameters:
      visibility - The new visibility.
      Returns:
      The builder for chained calls.
    • withFolder

      public BaseMeasureBuilder withFolder(String folder)
      Changes the folder of the created measure.
      Parameters:
      folder - The new folder to use.
      Returns:
      The builder for chained calls.
    • withMeasureGroups

      public BaseMeasureBuilder withMeasureGroups(String... groups) throws IllegalArgumentException
      Changes the measure groups of the created measure.
      Parameters:
      groups - The new groups to use.
      Returns:
      The builder for chained calls.
      Throws:
      IllegalArgumentException - If one of the groups contains a comma.
    • withFormatter

      public BaseMeasureBuilder withFormatter(String formatter)
      Changes the formatter of the created measure.
      Parameters:
      formatter - The formatter to use.
      Returns:
      The builder for chained calls.
    • withName

      public BaseMeasureBuilder withName(String name)
      Changes the name of the created measure.
      Parameters:
      name - The name to use.
      Returns:
      The builder for chained calls.