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