Package com.io7m.jxe.core
Class JXESchemaResolutionMappings.Builder
java.lang.Object
com.io7m.jxe.core.JXESchemaResolutionMappings.Builder
- Enclosing class:
- JXESchemaResolutionMappings
Builds instances of type
JXESchemaResolutionMappings
.
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 newJXESchemaResolutionMappings
.from
(JXESchemaResolutionMappingsType instance) Fill a builder with attribute values from the providedJXESchemaResolutionMappingsType
instance.putAllMappings
(Map<? extends URI, ? extends JXESchemaDefinition> entries) Put all mappings from the specified map as entries tomappings
map.putMappings
(URI key, JXESchemaDefinition value) Put one entry to themappings
map.putMappings
(Map.Entry<? extends URI, ? extends JXESchemaDefinition> entry) Put one entry to themappings
map.setMappings
(Map<? extends URI, ? extends JXESchemaDefinition> entries) Sets or replaces all mappings from the specified map as entries for themappings
map.
-
Method Details
-
from
Fill a builder with attribute values from the providedJXESchemaResolutionMappingsType
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.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
putMappings
Put one entry to themappings
map.- Parameters:
key
- The key in the mappings mapvalue
- The associated value in the mappings map- Returns:
this
builder for use in a chained invocation
-
putMappings
public final JXESchemaResolutionMappings.Builder putMappings(Map.Entry<? extends URI, ? extends JXESchemaDefinition> entry) Put one entry to themappings
map. Nulls are not permitted- Parameters:
entry
- The key and value entry- Returns:
this
builder for use in a chained invocation
-
setMappings
public final JXESchemaResolutionMappings.Builder setMappings(Map<? extends URI, ? extends JXESchemaDefinition> entries) Sets or replaces all mappings from the specified map as entries for themappings
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the mappings map- Returns:
this
builder for use in a chained invocation
-
putAllMappings
public final JXESchemaResolutionMappings.Builder putAllMappings(Map<? extends URI, ? extends JXESchemaDefinition> entries) Put all mappings from the specified map as entries tomappings
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the mappings map- Returns:
this
builder for use in a chained invocation
-
build
Builds a newJXESchemaResolutionMappings
.- Returns:
- An immutable instance of JXESchemaResolutionMappings
- Throws:
IllegalStateException
- if any required attributes are missing
-