public class MetadataBuilder extends Object
Metadata builder.
This builder has a default value:
type as MetricType.INVALID
unit as MetricUnits.NONE
reusable as Boolean.FALSE| Constructor and Description |
|---|
MetadataBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Metadata |
build() |
MetadataBuilder |
notReusable()
Sets the reusable to
Boolean.FALSE |
MetadataBuilder |
reusable()
Sets the reusable to
Boolean.TRUE |
MetadataBuilder |
withDescription(String description)
Sets the description
|
MetadataBuilder |
withDisplayName(String displayName)
Sets the displayName
|
MetadataBuilder |
withName(String name)
Sets the name
|
MetadataBuilder |
withType(MetricType type)
Sets the type
|
MetadataBuilder |
withUnit(String unit)
Sets the unit
|
public MetadataBuilder withName(String name)
name - the nameNullPointerException - when name is nullpublic MetadataBuilder withDisplayName(String displayName)
displayName - the displayNameNullPointerException - when displayName is nullpublic MetadataBuilder withDescription(String description)
description - the nameNullPointerException - when description is nullpublic MetadataBuilder withType(MetricType type)
type - the nameNullPointerException - when type is nullpublic MetadataBuilder withUnit(String unit)
unit - the nameNullPointerException - when unit is nullpublic MetadataBuilder reusable()
Boolean.TRUEpublic MetadataBuilder notReusable()
Boolean.FALSEpublic Metadata build()
Metadata from the provided propertiesIllegalStateException - when either name is nullCopyright © 2019 JBoss by Red Hat. All rights reserved.