c

com.lucidchart.open.xtract

ParseSuccess

case class ParseSuccess[+A](get: A) extends ParseResult[A] with Product with Serializable

A ParseResult indicating a completely successful parse.

Linear Supertypes
Serializable, Serializable, Product, Equals, ParseResult[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParseSuccess
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ParseResult
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ParseSuccess(get: A)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. final def collect[B](pf: PartialFunction[A, B]): ParseResult[B]

    Apply a PartialFunction to the result value.

    Apply a PartialFunction to the result value. If the pf function isn't defined for the result value a ParseFailure is returned.

    Definition Classes
    ParseResult
  7. final def collect[B](otherwise: ⇒ ParseError)(pf: PartialFunction[A, B]): ParseResult[B]

    Apply a PartialFunction to the result value.

    Apply a PartialFunction to the result value. If the pf isn't defined for the result value, a ParseFailure with the otherwise error is returned.

    Definition Classes
    ParseResult
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def errors: Seq[ParseError]

    A sequence of all ParseErrors that occurred.

    A sequence of all ParseErrors that occurred.

    Definition Classes
    ParseSuccessParseResult
  10. def filter(f: (A) ⇒ Boolean): ParseResult[A]

    f

    Predicate to filter the ParseResult by

    returns

    this if the test passes, or ParseFailure if the test fails.

    Definition Classes
    ParseResult
  11. def filter(error: ⇒ ParseError)(f: (A) ⇒ Boolean): ParseResult[A]

    error

    The error to use if the test fails.

    f

    Predicate to filter the ParseResult by

    returns

    if the result is successful and the filter fails ParseFailure is returned

    Definition Classes
    ParseResult
  12. def flatMap[B](f: (A) ⇒ ParseResult[B]): ParseResult[B]

    FlatMap over the result value.

    FlatMap over the result value.

    One thing to note is that if this is a PartialParseSuccess, then the errors are prepended to the result of calling f on the value. So for example, if f returns a ParseSuccess, but this is a PartialParseSuccess the final result will be a PartialParseSuccess containing the result from f and the errors from this.

    Definition Classes
    ParseResult
  13. def fold[B](onFailure: (Seq[ParseError]) ⇒ B)(onSuccess: (A) ⇒ B): B

    Handle both success and failure.

    Handle both success and failure.

    onFailure

    Function to handle a ParseFailure.

    onSuccess

    Function to process a successful parse.

    Definition Classes
    ParseResult
  14. def foreach(f: (A) ⇒ Unit): Unit

    Execute f on the result value if and only if this ParseResult is successful.

    Execute f on the result value if and only if this ParseResult is successful.

    f

    the function to execute.

    Definition Classes
    ParseResult
    Annotations
    @inline()
  15. val get: A
    Definition Classes
    ParseSuccessParseResult
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def getOrElse[B >: A](otherwise: ⇒ B): B

    returns

    the result value, unless this is a ParseFailure in which case return otherwise.

    Definition Classes
    ParseResult
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def isSuccessful: Boolean

    Is the result a success, i.e.

    Is the result a success, i.e. either a ParseSuccess or a PartialParseSuccess.

    Definition Classes
    ParseSuccessParseResult
  20. def map[B](f: (A) ⇒ B): ParseResult[B]

    Map a function over the result value.

    Map a function over the result value. The level of success, and any errors are propagated.

    Definition Classes
    ParseResult
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def or[B >: A](other: ParseResult[B]): ParseResult[B]

    returns

    this if this is successful, otherwise return other if other is successful, and a ParseFailure containing errors from both if both failed.

    Definition Classes
    ParseResult
  25. def orElse[B >: A](otherwise: ⇒ ParseResult[B]): ParseResult[B]

    Like or, but take otherwise as a by-name parameter, and don't combine errors from both.

    Like or, but take otherwise as a by-name parameter, and don't combine errors from both.

    returns

    this if this is successful otherwise return otherwise.

    Definition Classes
    ParseResult
  26. def recoverPartial[B >: A](otherwise: ⇒ B): ParseResult[B]

    If this is a ParseFailure recover as a PartialParseSuccess containing otherwise so that the errors are kept.

    If this is a ParseFailure recover as a PartialParseSuccess containing otherwise so that the errors are kept.

    Definition Classes
    ParseResult
  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toOption: Option[A]

    Convert to an Option

    Convert to an Option

    returns

    a Some containing the result if successful, or a None if a failure

    Definition Classes
    ParseResult
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def withFilter(f: (A) ⇒ Boolean): ParseResult[A]

    Alias for filter

    Alias for filter

    Definition Classes
    ParseResult
  33. def |[B >: A](other: ParseResult[B]): ParseResult[B]

    Alias for or

    Alias for or

    Definition Classes
    ParseResult

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ParseResult[A]

Inherited from AnyRef

Inherited from Any

Ungrouped