Class/Object

com.lambdista.config

Config

Related Docs: object Config | package config

Permalink

final case class Config(abstractMap: AbstractMap) extends Dynamic with Product with Serializable

This class represents the configuration.

Since

2015-11-27

Linear Supertypes
Serializable, Serializable, Product, Equals, Dynamic, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Config
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Dynamic
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Config(abstractMap: AbstractMap)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val abstractMap: AbstractMap

    Permalink
  5. def as[A](implicit arg0: ConcreteValue[A]): Try[A]

    Permalink

    Tries to convert the configuration to a type for which exists an instance of ConcreteValue in scope.

    Tries to convert the configuration to a type for which exists an instance of ConcreteValue in scope. Since the configuration is represented as a AbstractMap, A is generally a final case class or, simply, AbstractMap. The conversion to a case class happens automatically, you don't need to implement a ConcreteValue instance for it. The only requirement is that the configuration keys and values match the case class's field names and values, respectively. For example, given a config object pointing to this configuration:

    {
      bar: 42,
      baz: "hello"
    }

    and this final case class:

    final case class Foo(bar: Int, baz: String)

    the conversion is possible as in:

    config.as[Foo] // result Success(Foo(42, "hello"))
    returns

    a Try[A], which is a Success if the conversion is successful, a Failure if it's not.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def getAs[A](key: String)(implicit arg0: ConcreteValue[A]): Try[A]

    Permalink

    Tries to retrieve a config value and convert it into a concrete Scala value.

    Tries to retrieve a config value and convert it into a concrete Scala value. It may fail in one of two ways:

    1. The key looked for is not found.

    2. The conversion is not doable.

    key

    the key to look for

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def merge(thatConfig: Config): Config

    Permalink

    Merges two Config objects.

    Merges two Config objects. Basically if you look at the configuration as Maps, the resulting Config object is like using ++ with the two underlying Maps, as in thisConfig ++ thatConfig. E.g.:

    conf1:

    {
      foo = {
        alpha = 1,
        bar = "hello"
      },
      baz = 42
    }

    conf2:

    {
      foo = {
        baz = 15,
        bar = "goodbye"
      },
      baz = 1,
      zoo = "hi"
    }

    conf1.merge(conf2):

    {
      foo = {
        baz = 15,
        bar = "goodbye"
      },
      baz = 1,
      zoo = "hi"
    }
    thatConfig

    the Config to merge this Config with

  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. def recursivelyMerge(thatConfig: Config): Config

    Permalink

    Merges two Config objects.

    Merges two Config objects. Given a key, if the correspondent value is a map then thatConfig's value is "recursively" merged to this config's value otherwise thatConfig's value replaces this config's value. E.g.:

    conf1:

    {
      foo = {
        alpha = 1,
        bar = "hello"
      },
      baz = 42
    }

    conf2:

    {
      foo = {
        baz = 15,
        bar = "goodbye"
      },
      baz = 1,
      zoo = "hi"
    }

    conf1.recursivelyMerge(conf2):

    {
      foo = {
        alpha = 1,
        baz = 15,
        bar = "goodbye"
      },
      baz = 1,
      zoo = "hi"
    }
    thatConfig

    the Config to merge this Config with

  18. def selectDynamic(key: String): ConfigWalker

    Permalink
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Dynamic

Inherited from AnyRef

Inherited from Any

Ungrouped