MoveResult

zipper.Zipper.MoveResult
See theMoveResult companion object
sealed trait MoveResult[A]

A result of moving a zipper, which can be either successful or not

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Failure[A]
class Success[A]

Members list

Value members

Abstract methods

def origin: Zipper[A]

The starting point of the move

The starting point of the move

Attributes

Concrete methods

def flatMap(move: () => A): MoveResult[A]

Try another move on the resulting zipper, if the current move did not fail

Try another move on the resulting zipper, if the current move did not fail

Attributes

def get: Zipper[A]

Obtain the resulting zipper or throw an exception if the move failed

Obtain the resulting zipper or throw an exception if the move failed

Attributes

def getOrElse(other: (Zipper[A]) => Zipper[A]): Zipper[A]

Try another safe move if the current move failed

Try another safe move if the current move failed

Attributes

def getOrElse(other: Zipper[A]): Zipper[A]

Try another zipper if the current move failed

Try another zipper if the current move failed

Attributes

def map(f: (Zipper[A]) => Zipper[A]): MoveResult[A]

Safely move the resulting zipper, if the current move did not fail

Safely move the resulting zipper, if the current move did not fail

Attributes

def orElse(other: () => A): MoveResult[A]

Try another move if the current move failed

Try another move if the current move failed

Attributes

def orElse(other: => MoveResult[A]): MoveResult[A]

Try a result of another move if the current move failed

Try a result of another move if the current move failed

Attributes

def orStay: Zipper[A]

Obtain the resulting zipper or the original zipper in case the move failed

Obtain the resulting zipper or the original zipper in case the move failed

Attributes

def toOption: Option[Zipper[A]]

Obtain the resulting zipper or None if the move failed

Obtain the resulting zipper or None if the move failed

Attributes

def withOrigin(origin: Zipper[A]): MoveResult[A]

Change the starting point of the move

Change the starting point of the move

Attributes