public static final class ImmutableRole.Builder extends Object
ImmutableRole.
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 |
|---|---|
ImmutableRole.Builder |
actions(Iterable<String> elements)
Sets or replaces all elements for
actions list. |
ImmutableRole.Builder |
addActions(String... elements)
Adds elements to
actions list. |
ImmutableRole.Builder |
addActions(String element)
Adds one element to
actions list. |
ImmutableRole.Builder |
addAllActions(Iterable<String> elements)
Adds elements to
actions list. |
ImmutableRole |
build()
Builds a new
ImmutableRole. |
ImmutableRole.Builder |
collection(String collection)
Initializes the value for the
collection attribute. |
ImmutableRole.Builder |
database(String database)
Initializes the value for the
database attribute. |
ImmutableRole.Builder |
from(AuthenticationSetup.Role instance)
Fill a builder with attribute values from the provided
Role instance. |
ImmutableRole.Builder |
name(String name)
Initializes the value for the
name attribute. |
public final ImmutableRole.Builder from(AuthenticationSetup.Role instance)
Role instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableRole.Builder database(String database)
database attribute.database - The value for databasethis builder for use in a chained invocationpublic final ImmutableRole.Builder collection(String collection)
collection attribute.collection - The value for collectionthis builder for use in a chained invocationpublic final ImmutableRole.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final ImmutableRole.Builder addActions(String element)
actions list.element - A actions elementthis builder for use in a chained invocationpublic final ImmutableRole.Builder addActions(String... elements)
actions list.elements - An array of actions elementsthis builder for use in a chained invocationpublic final ImmutableRole.Builder actions(Iterable<String> elements)
actions list.elements - An iterable of actions elementsthis builder for use in a chained invocationpublic final ImmutableRole.Builder addAllActions(Iterable<String> elements)
actions list.elements - An iterable of actions elementsthis builder for use in a chained invocationpublic ImmutableRole build()
ImmutableRole.IllegalStateException - if any required attributes are missingCopyright © 2023. All rights reserved.