sealed trait ParseResult[+A] extends AnyRef

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

  • ParseSuccess indicates a completely successful result
  • ParseFailure indicates a completely failed result
  • PartialParseSuccess indicates there were recoverable errors and contains both the result and a list of errors that occurred.
Self Type
ParseResult[A]
Linear Supertypes
AnyRef, Any
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]

    A sequence of all ParseErrors that occurred.

  2. abstract def get: A
    Attributes
    protected
  3. abstract def isSuccessful: Boolean

    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
    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.

  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.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  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.

  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

  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.

  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.

  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.

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

    returns

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

  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. 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.

  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. 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.

  24. 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.

  25. 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.

  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. 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

  28. def toString(): String
    Definition Classes
    AnyRef → Any
  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

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

    Alias for or

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 AnyRef

Inherited from Any

Ungrouped