public static final class ImmutableCheck.Builder extends Object
ImmutableCheck.
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 |
|---|---|
ImmutableCheck |
build()
Builds a new
ImmutableCheck. |
ImmutableCheck.Builder |
from(Check instance)
Fill a builder with attribute values from the provided
Check instance. |
ImmutableCheck.Builder |
http(com.google.common.base.Optional<String> http)
Initializes the optional value
http to http. |
ImmutableCheck.Builder |
http(String http)
Initializes the optional value
http to http. |
ImmutableCheck.Builder |
id(String id)
Initializes the value for the
id attribute. |
ImmutableCheck.Builder |
interval(com.google.common.base.Optional<String> interval)
Initializes the optional value
interval to interval. |
ImmutableCheck.Builder |
interval(String interval)
Initializes the optional value
interval to interval. |
ImmutableCheck.Builder |
name(String name)
Initializes the value for the
name attribute. |
ImmutableCheck.Builder |
notes(com.google.common.base.Optional<String> notes)
Initializes the optional value
notes to notes. |
ImmutableCheck.Builder |
notes(String notes)
Initializes the optional value
notes to notes. |
ImmutableCheck.Builder |
output(com.google.common.base.Optional<String> output)
Initializes the optional value
output to output. |
ImmutableCheck.Builder |
output(String output)
Initializes the optional value
output to output. |
ImmutableCheck.Builder |
script(com.google.common.base.Optional<String> script)
Initializes the optional value
script to script. |
ImmutableCheck.Builder |
script(String script)
Initializes the optional value
script to script. |
ImmutableCheck.Builder |
serviceId(com.google.common.base.Optional<String> serviceId)
Initializes the optional value
serviceId to serviceId. |
ImmutableCheck.Builder |
serviceId(String serviceId)
Initializes the optional value
serviceId to serviceId. |
ImmutableCheck.Builder |
tcp(com.google.common.base.Optional<String> tcp)
Initializes the optional value
tcp to tcp. |
ImmutableCheck.Builder |
tcp(String tcp)
Initializes the optional value
tcp to tcp. |
ImmutableCheck.Builder |
ttl(com.google.common.base.Optional<String> ttl)
Initializes the optional value
ttl to ttl. |
ImmutableCheck.Builder |
ttl(String ttl)
Initializes the optional value
ttl to ttl. |
public final ImmutableCheck.Builder from(Check instance)
Check 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 ImmutableCheck.Builder id(String id)
id attribute.id - The value for idthis builder for use in a chained invocationpublic final ImmutableCheck.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final ImmutableCheck.Builder notes(String notes)
notes to notes.notes - The value for notesthis builder for chained invocationpublic final ImmutableCheck.Builder notes(com.google.common.base.Optional<String> notes)
notes to notes.notes - The value for notesthis builder for use in a chained invocationpublic final ImmutableCheck.Builder output(String output)
output to output.output - The value for outputthis builder for chained invocationpublic final ImmutableCheck.Builder output(com.google.common.base.Optional<String> output)
output to output.output - The value for outputthis builder for use in a chained invocationpublic final ImmutableCheck.Builder script(String script)
script to script.script - The value for scriptthis builder for chained invocationpublic final ImmutableCheck.Builder script(com.google.common.base.Optional<String> script)
script to script.script - The value for scriptthis builder for use in a chained invocationpublic final ImmutableCheck.Builder interval(String interval)
interval to interval.interval - The value for intervalthis builder for chained invocationpublic final ImmutableCheck.Builder interval(com.google.common.base.Optional<String> interval)
interval to interval.interval - The value for intervalthis builder for use in a chained invocationpublic final ImmutableCheck.Builder ttl(String ttl)
ttl to ttl.ttl - The value for ttlthis builder for chained invocationpublic final ImmutableCheck.Builder ttl(com.google.common.base.Optional<String> ttl)
ttl to ttl.ttl - The value for ttlthis builder for use in a chained invocationpublic final ImmutableCheck.Builder http(String http)
http to http.http - The value for httpthis builder for chained invocationpublic final ImmutableCheck.Builder http(com.google.common.base.Optional<String> http)
http to http.http - The value for httpthis builder for use in a chained invocationpublic final ImmutableCheck.Builder tcp(String tcp)
tcp to tcp.tcp - The value for tcpthis builder for chained invocationpublic final ImmutableCheck.Builder tcp(com.google.common.base.Optional<String> tcp)
tcp to tcp.tcp - The value for tcpthis builder for use in a chained invocationpublic final ImmutableCheck.Builder serviceId(String serviceId)
serviceId to serviceId.serviceId - The value for serviceIdthis builder for chained invocationpublic final ImmutableCheck.Builder serviceId(com.google.common.base.Optional<String> serviceId)
serviceId to serviceId.serviceId - The value for serviceIdthis builder for use in a chained invocationpublic ImmutableCheck build()
ImmutableCheck.IllegalStateException - if any required attributes are missingCopyright © 2016. All rights reserved.