Package com.activeviam.builders
Class BaseMeasureBuilder
- java.lang.Object
-
- com.activeviam.builders.BaseMeasureBuilder
-
public class BaseMeasureBuilder extends Object
Partial builder for all attributes contained inIMeasureMemberDescription.
-
-
Constructor Summary
Constructors Constructor Description BaseMeasureBuilder(String name)Constructor to start building a measure.BaseMeasureBuilder(String name, boolean visible, String folder, String measureGroups, String formatter)Constructor for build steps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyParametersToMeasureDescription(IMeasureMemberDescription target)Mutates a measure description to apply all the changes collected by this builder.BaseMeasureBuilderwithFolder(String folder)Changes the folder of the created measure.BaseMeasureBuilderwithFormatter(String formatter)Changes the formatter of the created measure.BaseMeasureBuilderwithMeasureGroups(String... groups)Changes the measure groups of the created measure.BaseMeasureBuilderwithName(String name)Changes the name of the created measure.BaseMeasureBuilderwithVisibility(boolean visibility)Changes the visibility of the created measure.
-
-
-
Constructor Detail
-
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 Detail
-
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.
-
-