public static final class CounterEvent.Builder extends Object
CounterEvent.
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 |
|---|---|
CounterEvent |
build()
Builds a new
CounterEvent. |
CounterEvent.Builder |
delta(Long delta)
Initializes the value for the
delta attribute. |
CounterEvent.Builder |
from(CounterEvent instance)
Fill a builder with attribute values from the provided
CounterEvent instance. |
CounterEvent.Builder |
name(String name)
Initializes the value for the
name attribute. |
CounterEvent.Builder |
total(Long total)
Initializes the value for the
total attribute. |
public final CounterEvent.Builder from(CounterEvent instance)
CounterEvent 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 CounterEvent.Builder delta(Long delta)
delta attribute.delta - The value for deltathis builder for use in a chained invocationpublic final CounterEvent.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final CounterEvent.Builder total(Long total)
total attribute.total - The value for total (can be null)this builder for use in a chained invocationpublic CounterEvent build()
CounterEvent.IllegalStateException - if any required attributes are missingCopyright © 2017 Pivotal Software, Inc.. All rights reserved.