public static final class UserConfig.Builder extends Object
UserConfig.
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 |
|---|---|
UserConfig.Builder |
addAllAllowedGroups(Iterable<String> elements)
Adds elements to
allowedGroups list. |
UserConfig.Builder |
addAllDefaultGroups(Iterable<String> elements)
Adds elements to
defaultGroups list. |
UserConfig.Builder |
allowedGroup(String element)
Adds one element to
allowedGroups list. |
UserConfig.Builder |
allowedGroups(Iterable<String> elements)
Sets or replaces all elements for
allowedGroups list. |
UserConfig.Builder |
allowedGroups(String... elements)
Adds elements to
allowedGroups list. |
UserConfig.Builder |
allowOriginLoop(Boolean allowOriginLoop)
Initializes the value for the
allowOriginLoop attribute. |
UserConfig |
build()
Builds a new
UserConfig. |
UserConfig.Builder |
defaultGroup(String element)
Adds one element to
defaultGroups list. |
UserConfig.Builder |
defaultGroups(Iterable<String> elements)
Sets or replaces all elements for
defaultGroups list. |
UserConfig.Builder |
defaultGroups(String... elements)
Adds elements to
defaultGroups list. |
UserConfig.Builder |
from(UserConfig instance)
Fill a builder with attribute values from the provided
UserConfig instance. |
UserConfig.Builder |
getcheckOriginEnabled(Boolean getcheckOriginEnabled)
Initializes the value for the
getcheckOriginEnabled attribute. |
UserConfig.Builder |
maxUsers(Integer maxUsers)
Initializes the value for the
maxUsers attribute. |
public final UserConfig.Builder from(UserConfig instance)
UserConfig 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 UserConfig.Builder defaultGroup(String element)
defaultGroups list.element - A defaultGroups elementthis builder for use in a chained invocationpublic final UserConfig.Builder defaultGroups(String... elements)
defaultGroups list.elements - An array of defaultGroups elementsthis builder for use in a chained invocationpublic final UserConfig.Builder defaultGroups(Iterable<String> elements)
defaultGroups list.elements - An iterable of defaultGroups elementsthis builder for use in a chained invocationpublic final UserConfig.Builder addAllDefaultGroups(Iterable<String> elements)
defaultGroups list.elements - An iterable of defaultGroups elementsthis builder for use in a chained invocationpublic final UserConfig.Builder allowedGroup(String element)
allowedGroups list.element - A allowedGroups elementthis builder for use in a chained invocationpublic final UserConfig.Builder allowedGroups(String... elements)
allowedGroups list.elements - An array of allowedGroups elementsthis builder for use in a chained invocationpublic final UserConfig.Builder allowedGroups(Iterable<String> elements)
allowedGroups list.elements - An iterable of allowedGroups elementsthis builder for use in a chained invocationpublic final UserConfig.Builder addAllAllowedGroups(Iterable<String> elements)
allowedGroups list.elements - An iterable of allowedGroups elementsthis builder for use in a chained invocationpublic final UserConfig.Builder maxUsers(Integer maxUsers)
maxUsers attribute.maxUsers - The value for maxUsers (can be null)this builder for use in a chained invocationpublic final UserConfig.Builder getcheckOriginEnabled(Boolean getcheckOriginEnabled)
getcheckOriginEnabled attribute.getcheckOriginEnabled - The value for getcheckOriginEnabled (can be null)this builder for use in a chained invocationpublic final UserConfig.Builder allowOriginLoop(Boolean allowOriginLoop)
allowOriginLoop attribute.allowOriginLoop - The value for allowOriginLoop (can be null)this builder for use in a chained invocationpublic UserConfig build()
UserConfig.IllegalStateException - if any required attributes are missingCopyright © 2026. All rights reserved.