@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","CachePolicy"}) @NotThreadSafe public final class CachePolicyBuilder extends Object
CachePolicy
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
CachePolicyBuilder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
Constructor and Description |
---|
CachePolicyBuilder()
Creates a builder for
CachePolicy instances. |
Modifier and Type | Method and Description |
---|---|
CachePolicy |
build()
Builds a new
CachePolicy . |
CachePolicyBuilder |
from(CachePolicy instance)
Fill a builder with attribute values from the provided
CachePolicy instance. |
CachePolicyBuilder |
maxEntries(long maxEntries)
Initializes the value for the
maxEntries attribute. |
CachePolicyBuilder |
statsEnabled(boolean statsEnabled)
Initializes the value for the
statsEnabled attribute. |
public CachePolicyBuilder()
CachePolicy
instances.@CanIgnoreReturnValue public final CachePolicyBuilder from(CachePolicy instance)
CachePolicy
instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance
- The instance from which to copy valuesthis
builder for use in a chained invocation@CanIgnoreReturnValue public final CachePolicyBuilder statsEnabled(boolean statsEnabled)
statsEnabled
attribute.
If not set, this attribute will have a default value as returned by the initializer of statsEnabled
.
statsEnabled
- The value for statsEnabledthis
builder for use in a chained invocation@CanIgnoreReturnValue public final CachePolicyBuilder maxEntries(long maxEntries)
maxEntries
attribute.
If not set, this attribute will have a default value as returned by the initializer of maxEntries
.
maxEntries
- The value for maxEntriesthis
builder for use in a chained invocationpublic CachePolicy build()
CachePolicy
.IllegalStateException
- if any required attributes are missingCopyright © 2019 OpenDaylight. All rights reserved.