Class JXESchemaResolutionMappings.Builder

java.lang.Object
com.io7m.jxe.core.JXESchemaResolutionMappings.Builder
Enclosing class:
JXESchemaResolutionMappings

public static final class JXESchemaResolutionMappings.Builder
extends java.lang.Object
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 Details

    • from

      Fill a builder with attribute values from the provided JXESchemaResolutionMappingsType 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

      public final JXESchemaResolutionMappings.Builder putMappings​(java.net.URI key, JXESchemaDefinition value)
      Put one entry to the mappings map.
      Parameters:
      key - The key in the mappings map
      value - The associated value in the mappings map
      Returns:
      this builder for use in a chained invocation
    • putMappings

      public final JXESchemaResolutionMappings.Builder putMappings​(java.util.Map.Entry<? extends java.net.URI,​? extends JXESchemaDefinition> entry)
      Put one entry to the mappings 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​(java.util.Map<? extends java.net.URI,​? extends JXESchemaDefinition> entries)
      Sets or replaces all mappings from the specified map as entries for the mappings 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​(java.util.Map<? extends java.net.URI,​? extends JXESchemaDefinition> entries)
      Put all mappings from the specified map as entries to mappings 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

      Returns:
      An immutable instance of JXESchemaResolutionMappings
      Throws:
      java.lang.IllegalStateException - if any required attributes are missing