@NotThreadSafe public static final class ImmutableMetricDescriptor.Builder extends Object implements ImmutableMetricDescriptor.AnchorBuildStage, ImmutableMetricDescriptor.ProjectBuildStage, ImmutableMetricDescriptor.ModuleBuildStage, ImmutableMetricDescriptor.IdBuildStage, ImmutableMetricDescriptor.BuildFinal
ImmutableMetricDescriptor
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
Modifier and Type | Method and Description |
---|---|
ImmutableMetricDescriptor.Builder |
anchor(Object anchor)
Initializes the value for the
anchor attribute. |
ImmutableMetricDescriptor |
build()
Builds a new
ImmutableMetricDescriptor . |
ImmutableMetricDescriptor.Builder |
description(String description)
Initializes the value for the
description attribute. |
ImmutableMetricDescriptor.Builder |
id(String id)
Initializes the value for the
id attribute. |
ImmutableMetricDescriptor.Builder |
module(String module)
Initializes the value for the
module attribute. |
ImmutableMetricDescriptor.Builder |
project(String project)
Initializes the value for the
project attribute. |
@CanIgnoreReturnValue public final ImmutableMetricDescriptor.Builder anchor(Object anchor)
anchor
attribute.anchor
in interface ImmutableMetricDescriptor.AnchorBuildStage
anchor
- The value for anchorthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMetricDescriptor.Builder project(String project)
project
attribute.project
in interface ImmutableMetricDescriptor.ProjectBuildStage
project
- The value for projectthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMetricDescriptor.Builder module(String module)
module
attribute.module
in interface ImmutableMetricDescriptor.ModuleBuildStage
module
- The value for modulethis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMetricDescriptor.Builder id(String id)
id
attribute.id
in interface ImmutableMetricDescriptor.IdBuildStage
id
- The value for idthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableMetricDescriptor.Builder description(String description)
description
attribute.
If not set, this attribute will have a default value as returned by the initializer of description
.
description
in interface ImmutableMetricDescriptor.BuildFinal
description
- The value for descriptionthis
builder for use in a chained invocationpublic ImmutableMetricDescriptor build()
ImmutableMetricDescriptor
.build
in interface ImmutableMetricDescriptor.BuildFinal
IllegalStateException
- if any required attributes are missingCopyright © 2019 OpenDaylight. All rights reserved.