public static final class ApplicationEvent.Builder extends Object
ApplicationEvent.
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 |
|---|---|
ApplicationEvent.Builder |
actor(String actor)
Initializes the value for the
actor attribute. |
ApplicationEvent |
build()
Builds a new
ApplicationEvent. |
ApplicationEvent.Builder |
description(String description)
Initializes the value for the
description attribute. |
ApplicationEvent.Builder |
event(String event)
Initializes the value for the
event attribute. |
ApplicationEvent.Builder |
from(ApplicationEvent instance)
Fill a builder with attribute values from the provided
ApplicationEvent instance. |
ApplicationEvent.Builder |
id(String id)
Initializes the value for the
id attribute. |
ApplicationEvent.Builder |
time(Date time)
Initializes the value for the
time attribute. |
public final ApplicationEvent.Builder from(ApplicationEvent instance)
ApplicationEvent 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 invocationpublic final ApplicationEvent.Builder actor(String actor)
actor attribute.actor - The value for actorthis builder for use in a chained invocationpublic final ApplicationEvent.Builder description(String description)
description attribute.description - The value for descriptionthis builder for use in a chained invocationpublic final ApplicationEvent.Builder event(String event)
event attribute.event - The value for eventthis builder for use in a chained invocationpublic final ApplicationEvent.Builder id(String id)
id attribute.id - The value for idthis builder for use in a chained invocationpublic final ApplicationEvent.Builder time(Date time)
time attribute.time - The value for time (can be null)this builder for use in a chained invocationpublic ApplicationEvent build()
ApplicationEvent.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.