- java.lang.Object
-
- com.powsybl.commons.reporter.ReportBuilder
-
-
Constructor Summary
Constructors Constructor Description ReportBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Report
build()
Build the correspondingReport
.ReportBuilder
withDefaultMessage(String defaultMessage)
Provide the default message to build theReport
with.ReportBuilder
withKey(String reportKey)
Provide the key to build theReport
with.ReportBuilder
withSeverity(TypedValue severity)
Provide the typed value for the default severity key to build theReport
with.ReportBuilder
withTypedValue(String key, boolean value, String type)
Provide one typed boolean value to build theReport
with.ReportBuilder
withTypedValue(String key, double value, String type)
Provide one typed double value to build theReport
with.ReportBuilder
withTypedValue(String key, float value, String type)
Provide one typed float value to build theReport
with.ReportBuilder
withTypedValue(String key, int value, String type)
Provide one typed int value to build theReport
with.ReportBuilder
withTypedValue(String key, long value, String type)
Provide one typed long value to build theReport
with.ReportBuilder
withTypedValue(String key, String value, String type)
Provide one typed string value to build theReport
with.ReportBuilder
withValue(String key, boolean value)
Provide one boolean value to build theReport
with.ReportBuilder
withValue(String key, double value)
Provide one double value to build theReport
with.ReportBuilder
withValue(String key, float value)
Provide one float value to build theReport
with.ReportBuilder
withValue(String key, int value)
Provide one int value to build theReport
with.ReportBuilder
withValue(String key, long value)
Provide one long value to build theReport
with.ReportBuilder
withValue(String key, String value)
Provide one string value to build theReport
with.
-
-
-
Method Detail
-
build
public Report build()
Build the correspondingReport
.- Returns:
- the new
Report
corresponding to currentReportBuilder
-
withKey
public ReportBuilder withKey(String reportKey)
Provide the key to build theReport
with.- Parameters:
reportKey
- the key identifying the report to build- Returns:
- a reference to this object
-
withDefaultMessage
public ReportBuilder withDefaultMessage(String defaultMessage)
Provide the default message to build theReport
with.- Parameters:
defaultMessage
- the default report message of the report to build, which may contain references to its values or to the values of correspondingReporter
.- Returns:
- a reference to this object
-
withTypedValue
public ReportBuilder withTypedValue(String key, String value, String type)
Provide one typed string value to build theReport
with.- Parameters:
key
- the key for the typed string valuevalue
- the string valuetype
- the string representing the type of the string value provided (seeTypedValue
constants for some generic types)- Returns:
- a reference to this object
-
withValue
public ReportBuilder withValue(String key, String value)
Provide one string value to build theReport
with.- Parameters:
key
- the key for the string valuevalue
- the string value- Returns:
- a reference to this object
-
withTypedValue
public ReportBuilder withTypedValue(String key, double value, String type)
Provide one typed double value to build theReport
with.- Parameters:
key
- the key for the typed double valuevalue
- the double valuetype
- the string representing the type of the double value provided (seeTypedValue
constants for some generic types)- Returns:
- a reference to this object
-
withValue
public ReportBuilder withValue(String key, double value)
Provide one double value to build theReport
with.- Parameters:
key
- the key for the double valuevalue
- the double value- Returns:
- a reference to this object
-
withTypedValue
public ReportBuilder withTypedValue(String key, float value, String type)
Provide one typed float value to build theReport
with.- Parameters:
key
- the key for the typed float valuevalue
- the float valuetype
- the string representing the type of the float value provided (seeTypedValue
constants for some generic types)- Returns:
- a reference to this object
-
withValue
public ReportBuilder withValue(String key, float value)
Provide one float value to build theReport
with.- Parameters:
key
- the key for the float valuevalue
- the float value- Returns:
- a reference to this object
-
withTypedValue
public ReportBuilder withTypedValue(String key, int value, String type)
Provide one typed int value to build theReport
with.- Parameters:
key
- the key for the typed int valuevalue
- the int valuetype
- the string representing the type of the int value provided (seeTypedValue
constants for some generic types)- Returns:
- a reference to this object
-
withValue
public ReportBuilder withValue(String key, int value)
Provide one int value to build theReport
with.- Parameters:
key
- the key for the int valuevalue
- the int value- Returns:
- a reference to this object
-
withTypedValue
public ReportBuilder withTypedValue(String key, long value, String type)
Provide one typed long value to build theReport
with.- Parameters:
key
- the key for the typed long valuevalue
- the long valuetype
- the string representing the type of the long value provided (seeTypedValue
constants for some generic types)- Returns:
- a reference to this object
-
withValue
public ReportBuilder withValue(String key, long value)
Provide one long value to build theReport
with.- Parameters:
key
- the key for the long valuevalue
- the long value- Returns:
- a reference to this object
-
withTypedValue
public ReportBuilder withTypedValue(String key, boolean value, String type)
Provide one typed boolean value to build theReport
with.- Parameters:
key
- the key for the typed boolean valuevalue
- the boolean valuetype
- the string representing the type of the boolean value provided (seeTypedValue
constants for some generic types)- Returns:
- a reference to this object
-
withValue
public ReportBuilder withValue(String key, boolean value)
Provide one boolean value to build theReport
with.- Parameters:
key
- the key for the boolean valuevalue
- the boolean value- Returns:
- a reference to this object
-
withSeverity
public ReportBuilder withSeverity(TypedValue severity)
Provide the typed value for the default severity key to build theReport
with.- Parameters:
severity
- the typed value- Returns:
- a reference to this object
-
-