@NotThreadSafe public static final class ImmutableWatcherBean.Builder extends Object
ImmutableWatcherBean
.
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 |
---|---|
ImmutableWatcherBean |
build()
Builds a new
ImmutableWatcherBean . |
ImmutableWatcherBean.Builder |
from(WatcherBean instance)
Fill a builder with attribute values from the provided
WatcherBean instance. |
ImmutableWatcherBean.Builder |
setObjectId(Integer objectId)
Initializes the value for the
objectId attribute. |
ImmutableWatcherBean.Builder |
setUserKey(String userKey)
Initializes the value for the
userKey attribute. |
@CanIgnoreReturnValue public final ImmutableWatcherBean.Builder from(WatcherBean instance)
WatcherBean
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 ImmutableWatcherBean.Builder setObjectId(Integer objectId)
objectId
attribute.objectId
- The value for objectIdthis
builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableWatcherBean.Builder setUserKey(String userKey)
userKey
attribute.userKey
- The value for userKeythis
builder for use in a chained invocationpublic ImmutableWatcherBean build()
ImmutableWatcherBean
.IllegalStateException
- if any required attributes are missingCopyright © 2024 Atlassian. All rights reserved.