Package com.io7m.waxmill.database.api

# Class WXMDatabaseConfiguration

java.lang.Object
com.io7m.waxmill.database.api.WXMDatabaseConfiguration

All Implemented Interfaces:
  `WXMDatabaseConfigurationType`

    public final class WXMDatabaseConfiguration
    extends java.lang.Object
    implements WXMDatabaseConfigurationType

The configuration for a database.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `WXMDatabaseConfiguration.Builder` | Builds instances of type `WXMDatabaseConfiguration`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static WXMDatabaseConfiguration.Builder` | `builder()` | Creates a builder for `WXMDatabaseConfiguration`.
  `static WXMDatabaseConfiguration` | `copyOf​(WXMDatabaseConfigurationType instance)` | Creates an immutable copy of a `WXMDatabaseConfigurationType` value.
  `java.nio.file.Path` | `databaseDirectory()` | A directory that contains the database.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMDatabaseConfiguration` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `databaseDirectory`.
  `java.lang.String` | `toString()` | Prints the immutable value `WXMDatabaseConfiguration` with attribute values.
  `WXMDatabaseConfiguration` | `withDatabaseDirectory​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `databaseDirectory` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### databaseDirectory

    public java.nio.file.Path databaseDirectory()
    A directory that contains the database.
    Specified by:
      `databaseDirectory` in interface `WXMDatabaseConfigurationType`
    Returns:
      The database directory

  - ### withDatabaseDirectory

    public final WXMDatabaseConfiguration withDatabaseDirectory​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `databaseDirectory` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for databaseDirectory
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMDatabaseConfiguration` that have equal attribute values.
    Overrides:
      `equals` in class `java.lang.Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `databaseDirectory`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

    public java.lang.String toString()
    Prints the immutable value `WXMDatabaseConfiguration` with attribute values.
    Overrides:
      `toString` in class `java.lang.Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static WXMDatabaseConfiguration copyOf​(WXMDatabaseConfigurationType instance)
    Creates an immutable copy of a `WXMDatabaseConfigurationType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable WXMDatabaseConfiguration instance

  - ### builder

    public static WXMDatabaseConfiguration.Builder builder()
    Creates a builder for `WXMDatabaseConfiguration`.

         WXMDatabaseConfiguration.builder()
            .setDatabaseDirectory(java.nio.file.Path) // required databaseDirectory
            .build();

    Returns:
      A new WXMDatabaseConfiguration builder