public class MetadataBuilder extends Object
Constructor and Description |
---|
MetadataBuilder() |
Modifier and Type | Method and Description |
---|---|
Metadata |
build() |
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 nullIllegalArgumentException
- when name is emptypublic MetadataBuilder withDisplayName(String displayName)
displayName
- the displayName, empty string is considered as "not present" (null)public MetadataBuilder withDescription(String description)
description
- the name, empty string is considered as "not present" (null)public MetadataBuilder withType(MetricType type)
type
- the type, MetricType.INVALID
is considered as "not present" (null)public MetadataBuilder withUnit(String unit)
unit
- the unit, MetricUnits.NONE
is considered as "not present" (null)public Metadata build()
Metadata
from the provided propertiesIllegalStateException
- when either name is nullCopyright © 2017 – 2020 Eclipse Foundation. All rights reserved.
Use is subject to license terms.