TransformedDiffer
class TransformedDiffer[T, U](underlyingDiffer: ValueDiffer[U], transformFunc: T => U) extends ValueDiffer[T]
A Differ that transforms any input of diff method and pass it to its underlying Differ. See ValueDiffer.contramap
Type members
Inherited types
Value members
Concrete methods
override def configurePairBy(path: ConfigurePath, op: PairBy[_]): Either[ConfigureError, TransformedDiffer[T, U]]
- Definition Classes
override def configurePath(step: String, nextPath: ConfigurePath, op: ConfigureOp): Either[ConfigureError, TransformedDiffer[T, U]]
- Definition Classes
Inherited methods
final def configureRaw(path: ConfigurePath, operation: ConfigureOp): Either[ConfigureError, Differ[T]]
Attempt to change the configuration of this Differ. If successful, a new differ with the updated configuration will be returned.
Attempt to change the configuration of this Differ. If successful, a new differ with the updated configuration will be returned.
The configuration change can fail due to
- bad "path" that does not match the internal structure of the Differ
- The path resolved correctly, but the configuration update operation cannot be applied for that part of the Differ (e.g. wrong type or wrong operation)
- Value parameters:
- operation
The configuration change operation you want to perform on the target sub-Differ
- path
The path to traverse to the sub-Differ
- Inherited from:
- Differ