Package com.activeviam.builders
Class BaseMeasureBuilder
java.lang.Object
com.activeviam.builders.BaseMeasureBuilder
Partial builder for all attributes contained in
IMeasureMemberDescription.-
Constructor Summary
ConstructorsConstructorDescriptionBaseMeasureBuilder(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
Modifier and TypeMethodDescriptionvoidMutates a measure description to apply all the changes collected by this builder.withFolder(String folder) Changes the folder of the created measure.withFormatter(String formatter) Changes the formatter of the created measure.withMeasureGroups(String... groups) Changes the measure groups of the created measure.Changes the name of the created measure.withVisibility(boolean visibility) Changes the visibility of the created measure.
-
Constructor Details
-
BaseMeasureBuilder
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
Mutates a measure description to apply all the changes collected by this builder.- Parameters:
target- The measure description to mutate.
-
withVisibility
Changes the visibility of the created measure.- Parameters:
visibility- The new visibility.- Returns:
- The builder for chained calls.
-
withFolder
Changes the folder of the created measure.- Parameters:
folder- The new folder to use.- Returns:
- The builder for chained calls.
-
withMeasureGroups
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
Changes the formatter of the created measure.- Parameters:
formatter- The formatter to use.- Returns:
- The builder for chained calls.
-
withName
Changes the name of the created measure.- Parameters:
name- The name to use.- Returns:
- The builder for chained calls.
-