Class RealmConfigBuilder


  • @Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"})
    public final class RealmConfigBuilder
    extends java.lang.Object
    Builder for RealmConfig.
    • Constructor Detail

      • RealmConfigBuilder

        public RealmConfigBuilder()
        Constructs an empty RealmConfigBuilder
      • RealmConfigBuilder

        public RealmConfigBuilder​(java.util.Map<RealmConfig.Field,​java.lang.Object> values)
        Constructs a RealmConfigBuilder initialized with the values from the given map
        Parameters:
        values - a map containing configuration values
      • RealmConfigBuilder

        public RealmConfigBuilder​(RealmConfig config)
        Constructs a RealmConfigBuilder initialized with the values from the given config
        Parameters:
        config - the configuration to take the values from
      • RealmConfigBuilder

        public RealmConfigBuilder​(RealmConfigBuilder builder)
        Constructs a RealmConfigBuilder initialized with the values from the given builder
        Parameters:
        builder - the builder to take the values from
    • Method Detail

      • putAll

        public RealmConfigBuilder putAll​(java.util.Map<RealmConfig.Field,​java.lang.Object> values)
        Puts all values from the given map into this builder.
        Parameters:
        values - the values to put in the builder
      • putAll

        public RealmConfigBuilder putAll​(RealmConfig config)
        Puts all values from the given config into this builder
        Parameters:
        config - the config to take the values from
      • build

        public RealmConfig build​(java.lang.String parentPath)
        Builds the RealmConfig.
        Parameters:
        parentPath - if not null, resolves relative paths against this parentPath
        Returns:
        an instance of RealmConfig
      • build

        public RealmConfig build()
        Builds the RealmConfig with a parentPath of null.
        Returns:
        An instance of RealmConfig
        See Also:
        build(String)
      • toInputStream

        public java.io.InputStream toInputStream()
        Returns:
        an InputStream representing the config
      • getValues

        public java.util.Map<RealmConfig.Field,​java.lang.Object> getValues()
        Returns:
        the raw config values
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setImplementation

        public RealmConfigBuilder setImplementation​(java.lang.String implementation)
        class name of the realm implementation to load
      • setOptions

        public RealmConfigBuilder setOptions​(java.lang.Object options)
        implementation dependent configuration options for the realm