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 aLeft
with a list of failures in case an error occurred during navigation
- Alphabetic
- By Inheritance
- FluentConfigCursor
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new FluentConfigCursor(cursor: Result[ConfigCursor])
- cursor
the regular cursor pointed to by this object, wrapped itself into a
Right
, or aLeft
with a list of failures in case an error occurred during navigation
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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.
- 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.
- 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.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val cursor: Result[ConfigCursor]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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.
- 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.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()