Result
Result of a parser. Either a Success[A]
or a Failure
Result of a parser. Either a Success[A]
or a Failure
- Type Params
- A
The type of expected success result
Value members
Abstract methods
Returns the results's value.
Returns the results's value.
- Throws
- java.util.NoSuchElementException
if the result is a failure.
- Since
1.7.0
- Note
The result must not be a failure.
Returns true
if this is a Failure
, false
otherwise.
Returns true
if this is a Failure
, false
otherwise.
- Since
1.7.0
Concrete methods
Returns true
if this is a Success
and its value is equal to elem
(as determined by ==
),
returns false
otherwise.
Returns true
if this is a Success
and its value is equal to elem
(as determined by ==
),
returns false
otherwise.
- Value Params
- elem
the element to test.
- Returns
true
if this is aSuccess
value equal toelem
.- Since
1.7.0
Returns false
if Failure
or returns the result of the application of
the given predicate to the Success
value.
Returns false
if Failure
or returns the result of the application of
the given predicate to the Success
value.
- Since
1.7.0
Returns Success
with the existing value of Success
if this is a Success
and the given predicate p
holds for the right value,
or Failure(msg)
if this is a Success
and the given predicate p
does not hold for the right value,
or Failure
with the existing value of Failure
if this is a Failure
.
Returns Success
with the existing value of Success
if this is a Success
and the given predicate p
holds for the right value,
or Failure(msg)
if this is a Success
and the given predicate p
does not hold for the right value,
or Failure
with the existing value of Failure
if this is a Failure
.
- Since
1.7.0
Binds the given function across Success
.
Binds the given function across Success
.
- Value Params
- f
The function to bind across
Success
.
- Since
1.7.0
Returns the right value if this is right or this value if this is left
Returns the right value if this is right or this value if this is left
Equivalent to flatMap(id => id)
- Since
1.7.0
Applies fa
if this is a Failure
or fb
if this is a Success
.
Applies fa
if this is a Failure
or fb
if this is a Success
.
- Value Params
- fa
the function to apply if this is a
Success
- ferr
the function to apply if this is a
Failure
- Returns
the results of applying the function
- Since
1.7.0
Returns true
if Failure
or returns the result of the application of
the given predicate to the Success
value.
Returns true
if Failure
or returns the result of the application of
the given predicate to the Success
value.
- Since
1.7.0
Executes the given side-effecting function if this is a Success
.
Executes the given side-effecting function if this is a Success
.
- Value Params
- f
The side-effecting function to execute.
- Since
1.7.0
Returns the value from this Success
or the given argument if this is a Failure
.
Returns the value from this Success
or the given argument if this is a Failure
.
- Since
1.7.0
The given function is applied if this is a Success
.
The given function is applied if this is a Success
.
- Since
1.7.0
Returns this Success
or the given argument if this is a Failure
.
Returns this Success
or the given argument if this is a Failure
.
- Since
1.7.0
Converts the Result
into a Either
where Failure
maps to a Left[Err]
Converts the Result
into a Either
where Failure
maps to a Left[Err]
- Since
1.7.0
Returns a Some
containing the Success
value
if it exists or a None
if this is a Failure
.
Returns a Some
containing the Success
value
if it exists or a None
if this is a Failure
.
- Since
1.7.0
Returns a Seq
containing the Success
value if
it exists or an empty Seq
if this is a Failure
.
Returns a Seq
containing the Success
value if
it exists or an empty Seq
if this is a Failure
.
- Since
1.7.0