Casts this cursor as either a ConfigListCursor
or a ConfigObjectCursor
.
Casts this cursor as either a ConfigListCursor
or a ConfigObjectCursor
.
a Right
with this cursor as a list or object cursor if the cast can be done, Left
with a list of
failures otherwise.
Casts this cursor to a list of cursors.
Casts this cursor to a list of cursors.
a Right
with the list pointed to by this cursor if the cast can be done, Left
with a list of failures
otherwise.
Casts this cursor to a ConfigListCursor
.
Casts this cursor to a ConfigListCursor
.
a Right
with this cursor as a list cursor if the cast can be done, Left
with a list of failures
otherwise.
Casts this cursor to a map from config keys to cursors.
Casts this cursor to a map from config keys to cursors.
a Right
with the map pointed to by this cursor if the cast can be done, Left
with a list of failures
otherwise.
Casts this cursor to a ConfigObjectCursor
.
Casts this cursor to a ConfigObjectCursor
.
a Right
with this cursor as an object cursor if it points to an object, Left
with a list of failures
otherwise.
Casts this cursor to a string.
Casts this cursor to a string.
a Right
with the string value pointed to by this cursor if the cast can be done, Left
with a list of
failures otherwise.
Returns a cursor to the config at a given key.
Returns a cursor to the config at a given key.
the key of the config for which a cursor should be returned
a Right
with a cursor to the config at key
if such a config exists, a Left
with a list of failures
otherwise.
Returns a cursor to the config at a given key.
Returns a cursor to the config at a given key. A missing key will return a cursor to an undefined value.
the key of the config for which a cursor should be returned
a cursor to the config at key
if such a config exists, a cursor to an undefined value otherwise.
Returns a cursor to the config at the path composed of given path segments.
Returns a cursor to the config at the path composed of given path segments.
the path of the config for which a cursor should be returned
a Right
with a cursor to the config at pathSegments
if such a config exists, a Left
with a list of
failures otherwise.
Returns a failed ConfigReader
result resulting from scoping a FailureReason
into the context of this cursor.
Returns a failed ConfigReader
result resulting from scoping a FailureReason
into the context of this cursor.
This operation is the easiest way to return a failure from a ConfigReader
.
the returning type of the ConfigReader
the reason of the failure
a failed ConfigReader
result built by scoping reason
into the context of this cursor.
Returns a ConfigReaderFailure
resulting from scoping a FailureReason
into the context of this cursor.
Returns a ConfigReaderFailure
resulting from scoping a FailureReason
into the context of this cursor.
This operation is useful for constructing ConfigReaderFailures
when there are multiple FailureReason
s.
the reason of the failure
a ConfigReaderFailure
built by scoping reason
into the context of this cursor.
Returns whether the config object pointed to by this cursor is empty.
Returns whether this cursor points to a null
config value.
Returns whether this cursor points to a null
config value. An explicit null
value is different than a missing
value - isUndefined
can be used to check for the latter.
true
if this cursor points to a null
value, false
otherwise.
Returns whether this cursor points to an undefined value.
Returns whether this cursor points to an undefined value. A cursor can point to an undefined value when a missing
config key is requested or when a null
ConfigValue
is provided, among other reasons.
true
if this cursor points to an undefined value, false
otherwise.
Returns the list of keys of the config object pointed to by this cursor.
The file system location of the config to which this cursor points.
The file system location of the config to which this cursor points.
Returns a map of cursors to the elements of the config object pointed to by this cursor.
The path in the config to which this cursor points.
The path in the config to which this cursor points.
The path in the config to which this cursor points as a list of keys in reverse order (deepest key first).
The path in the config to which this cursor points as a list of keys in reverse order (deepest key first).
Returns a failed ConfigReader
result resulting from scoping a Either[FailureReason, A]
into the context of
this cursor.
Returns a failed ConfigReader
result resulting from scoping a Either[FailureReason, A]
into the context of
this cursor.
This operation is needed when control of the reading process is passed to a place without a ConfigCursor
instance providing the nexessary context (for example, when ConfigReader.fromString
is used. In those scenarios,
the call should be wrapped in this method in order to turn FailureReason
instances into ConfigReaderFailures
.
the returning type of the ConfigReader
the result of a config reading operation
a ConfigReader
result built by scoping reason
into the context of this cursor.
Returns the size of the config object pointed to by this cursor.
The ConfigValue
to which this cursor points to.
The ConfigValue
to which this cursor points to.
Returns a cursor to the object pointed to by this cursor without a given key.
Returns a cursor to the object pointed to by this cursor without a given key.
the key to remove on the config object
a cursor to the object pointed to by this cursor without key
.
A
ConfigCursor
pointing to a config object.