Package com.io7m.jade.api
Class ApplicationDirectoryConfiguration.Builder
java.lang.Object
com.io7m.jade.api.ApplicationDirectoryConfiguration.Builder
- Enclosing class:
- ApplicationDirectoryConfiguration
Builds instances of type
ApplicationDirectoryConfiguration
.
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newApplicationDirectoryConfiguration
.from
(ApplicationDirectoryConfigurationType instance) Fill a builder with attribute values from the providedApplicationDirectoryConfigurationType
instance.setApplicationName
(String applicationName) Initializes the value for theapplicationName
attribute.setOverridePropertyName
(String overridePropertyName) Initializes the optional valueoverridePropertyName
to overridePropertyName.setOverridePropertyName
(Optional<String> overridePropertyName) Initializes the optional valueoverridePropertyName
to overridePropertyName.setPortablePropertyName
(String portablePropertyName) Initializes the optional valueportablePropertyName
to portablePropertyName.setPortablePropertyName
(Optional<String> portablePropertyName) Initializes the optional valueportablePropertyName
to portablePropertyName.
-
Method Details
-
from
public final ApplicationDirectoryConfiguration.Builder from(ApplicationDirectoryConfigurationType instance) Fill a builder with attribute values from the providedApplicationDirectoryConfigurationType
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setApplicationName
Initializes the value for theapplicationName
attribute.- Parameters:
applicationName
- The value for applicationName- Returns:
this
builder for use in a chained invocation
-
setPortablePropertyName
public final ApplicationDirectoryConfiguration.Builder setPortablePropertyName(String portablePropertyName) Initializes the optional valueportablePropertyName
to portablePropertyName.- Parameters:
portablePropertyName
- The value for portablePropertyName- Returns:
this
builder for chained invocation
-
setPortablePropertyName
public final ApplicationDirectoryConfiguration.Builder setPortablePropertyName(Optional<String> portablePropertyName) Initializes the optional valueportablePropertyName
to portablePropertyName.- Parameters:
portablePropertyName
- The value for portablePropertyName- Returns:
this
builder for use in a chained invocation
-
setOverridePropertyName
public final ApplicationDirectoryConfiguration.Builder setOverridePropertyName(String overridePropertyName) Initializes the optional valueoverridePropertyName
to overridePropertyName.- Parameters:
overridePropertyName
- The value for overridePropertyName- Returns:
this
builder for chained invocation
-
setOverridePropertyName
public final ApplicationDirectoryConfiguration.Builder setOverridePropertyName(Optional<String> overridePropertyName) Initializes the optional valueoverridePropertyName
to overridePropertyName.- Parameters:
overridePropertyName
- The value for overridePropertyName- Returns:
this
builder for use in a chained invocation
-
build
Builds a newApplicationDirectoryConfiguration
.- Returns:
- An immutable instance of ApplicationDirectoryConfiguration
- Throws:
IllegalStateException
- if any required attributes are missing
-