c

pureconfig

FluentConfigCursor

case class FluentConfigCursor(cursor: Result[ConfigCursor]) extends Product with Serializable

A version of ConfigCursor with a more fluent interface, focused on config navigation instead of error handling.

The at method, used to access object and list values, is available without a previous need to cast the cursor and always returns another cursor instead of a ConfigReader.Result. The error handling is left for the last step, where users can opt to cast to a primitive value using one of the as methods or by requesting a regular cursor with cursor.

cursor

the regular cursor pointed to by this object, wrapped itself into a Right, or a Left with a list of failures in case an error occurred during navigation

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

Instance Constructors

  1. new FluentConfigCursor(cursor: Result[ConfigCursor])

    cursor

    the regular cursor pointed to by this object, wrapped itself into a Right, or a Left with a list of failures in case an error occurred during navigation

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def asBoolean: Result[Boolean]

    Casts this cursor to a boolean.

    Casts this cursor to a boolean.

    returns

    a Right with the boolean value pointed to by this cursor if the cast can be done, Left with a list of failures otherwise.

  5. def asDouble: Result[Double]

    Casts this cursor to a double.

    Casts this cursor to a double.

    returns

    a Right with the double value pointed to by this cursor if the cast can be done, Left with a list of failures otherwise.

  6. def asFloat: Result[Float]

    Casts this cursor to a float.

    Casts this cursor to a float.

    returns

    a Right with the float value pointed to by this cursor if the cast can be done, Left with a list of failures otherwise.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def asInt: Result[Int]

    Casts this cursor to an int.

    Casts this cursor to an int.

    returns

    a Right with the int value pointed to by this cursor if the cast can be done, Left with a list of failures otherwise.

  9. def asListCursor: Result[ConfigListCursor]

    Casts this cursor to a ConfigListCursor.

    Casts this cursor to a ConfigListCursor.

    returns

    a Right with this cursor as a list cursor if the cast can be done, Left with a list of failures otherwise.

  10. def asLong: Result[Long]

    Casts this cursor to a long.

    Casts this cursor to a long.

    returns

    a Right with the long value pointed to by this cursor if the cast can be done, Left with a list of failures otherwise.

  11. def asObjectCursor: Result[ConfigObjectCursor]

    Casts this cursor to a ConfigObjectCursor.

    Casts this cursor to a ConfigObjectCursor.

    returns

    a Right with this cursor as an object cursor if it points to an object, Left with a list of failures otherwise.

  12. def asShort: Result[Short]

    Casts this cursor to a short.

    Casts this cursor to a short.

    returns

    a Right with the short value pointed to by this cursor if the cast can be done, Left with a list of failures otherwise.

  13. def asString: Result[String]

    Casts this cursor to a string.

    Casts this cursor to a string.

    returns

    a Right with the string value pointed to by this cursor if the cast can be done, Left with a list of failures otherwise.

  14. def at(segments: PathSegment*): FluentConfigCursor

    Returns a cursor to the config at a given path.

    Returns a cursor to the config at a given path.

    segments

    the path of the config for which a cursor should be returned

    returns

    a FluentConfigCursor pointing to the provided path.

  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  16. val cursor: Result[ConfigCursor]
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def mapList[A](f: (ConfigCursor) ⇒ Result[A]): Result[List[A]]

    Casts this cursor to a ConfigListCursor and maps each element to a result.

    Casts this cursor to a ConfigListCursor and maps each element to a result. This method tries to map all elements, combining failures from all of them if more than one exists.

    A

    the result type of the elements

    f

    the function used to map elements

    returns

    a Right with the list obtained by mapping all elements of the list pointed to by this cursor if all casts and mappings can be done, Left with a list of failures otherwise.

  22. def mapObject[A](f: (ConfigCursor) ⇒ Result[A]): Result[Map[String, A]]

    Casts this cursor to a ConfigObjectCursor and maps each value to a result.

    Casts this cursor to a ConfigObjectCursor and maps each value to a result. This method tries to map all elements, combining failures from all of them if more than one exists.

    A

    the result type of the values

    f

    the function used to map values

    returns

    a Right with the map obtained by mapping all values of the object pointed to by this cursor if all casts and mappings can be done, Left with a list of failures otherwise.

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped