Trait/Object

com.lucidchart.open.xtract

ParseResult

Related Docs: object ParseResult | package xtract

Permalink

sealed trait ParseResult[+A] extends AnyRef

Trait containing the result of an XmlReader. It can contain one of the following:

Self Type
ParseResult[A]
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ParseResult
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def errors: Seq[ParseError]

    Permalink

    A sequence of all ParseErrors that occurred.

  2. abstract def get: A

    Permalink
    Attributes
    protected
  3. abstract def isSuccessful: Boolean

    Permalink

    Is the result a success, i.e.

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

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def collect[B](pf: PartialFunction[A, B]): ParseResult[B]

    Permalink

    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.

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

    Permalink

    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.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def filter(f: (A) ⇒ Boolean): ParseResult[A]

    Permalink

    f

    Predicate to filter the ParseResult by

    returns

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

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

    Permalink

    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

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def flatMap[B](f: (A) ⇒ ParseResult[B]): ParseResult[B]

    Permalink

    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.

  14. def fold[B](onFailure: (Seq[ParseError]) ⇒ B)(onSuccess: (A) ⇒ B): B

    Permalink

    Handle both success and failure.

    Handle both success and failure.

    onFailure

    Function to handle a ParseFailure.

    onSuccess

    Function to process a successful parse.

  15. def foreach(f: (A) ⇒ Unit): Unit

    Permalink

    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.

    Annotations
    @inline()
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getOrElse[B >: A](otherwise: ⇒ B): B

    Permalink

    returns

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

  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

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

    Permalink

    Map a function over the result value.

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

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

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

    Permalink

    returns

    this if this is successful otherwise return otherwise.

  25. def recoverPartial[B >: A](otherwise: ⇒ B): ParseResult[B]

    Permalink

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

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toOption: Option[A]

    Permalink

    Convert to an Option

    Convert to an Option

    returns

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

  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def withFilter(f: (A) ⇒ Boolean): ParseResult[A]

    Permalink

    Alias for filter

Inherited from AnyRef

Inherited from Any

Ungrouped