public static final class RuleEntity.Builder extends Object
RuleEntity.
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 |
|---|---|
RuleEntity |
build()
Builds a new
RuleEntity. |
RuleEntity.Builder |
code(Integer code)
Initializes the value for the
code attribute. |
RuleEntity.Builder |
description(String description)
Initializes the value for the
description attribute. |
RuleEntity.Builder |
destination(String destination)
Initializes the value for the
destination attribute. |
RuleEntity.Builder |
from(RuleEntity instance)
Fill a builder with attribute values from the provided
RuleEntity instance. |
RuleEntity.Builder |
log(Boolean log)
Initializes the value for the
log attribute. |
RuleEntity.Builder |
ports(String ports)
Initializes the value for the
ports attribute. |
RuleEntity.Builder |
protocol(Protocol protocol)
Initializes the value for the
protocol attribute. |
RuleEntity.Builder |
type(Integer type)
Initializes the value for the
type attribute. |
public final RuleEntity.Builder from(RuleEntity instance)
RuleEntity 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 RuleEntity.Builder code(Integer code)
code attribute.code - The value for code (can be null)this builder for use in a chained invocationpublic final RuleEntity.Builder description(String description)
description attribute.description - The value for description (can be null)this builder for use in a chained invocationpublic final RuleEntity.Builder destination(String destination)
destination attribute.destination - The value for destination (can be null)this builder for use in a chained invocationpublic final RuleEntity.Builder log(Boolean log)
log attribute.log - The value for log (can be null)this builder for use in a chained invocationpublic final RuleEntity.Builder ports(String ports)
ports attribute.ports - The value for ports (can be null)this builder for use in a chained invocationpublic final RuleEntity.Builder protocol(Protocol protocol)
protocol attribute.protocol - The value for protocol (can be null)this builder for use in a chained invocationpublic final RuleEntity.Builder type(Integer type)
type attribute.type - The value for type (can be null)this builder for use in a chained invocationpublic RuleEntity build()
RuleEntity.IllegalStateException - if any required attributes are missingCopyright © 2020. All rights reserved.