Trait to define the behavior of an extractor (parser) that takes an XML Node and return Try[T] where T is the underlying type of the Extractor.
Type parameters
- T
-
the type to be constructed.
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
object charSequenceExtractorclass SubclassExtractor[T]
- Self type
-
Extractor[T]
Members list
Value members
Abstract methods
Method to convert a Node into a Try[T].
Method to convert a Node into a Try[T].
Value parameters
- node
-
a
Node.
Attributes
- Returns
-
a
Try[T].
Concrete methods
Method to flatMap this Extractor[T] into an Extractor[U].
Method to flatMap this Extractor[T] into an Extractor[U].
Type parameters
- U
-
the underlying type of the result.
Value parameters
- f
-
a
T => Try[U].
Attributes
- Returns
-
an
Extractor[U].
Lifts this Extractor[T] into an Extractor[Option[T]]. If the extraction is successful, the resulting value is wrapped in Some.
Lifts this Extractor[T] into an Extractor[Option[T]]. If the extraction is successful, the resulting value is wrapped in Some.
Attributes
- Returns
-
an
Extractor[Option[T]], which extracts anOption[T]from aNode.
Method to map this Extractor[T] into an Extractor[U].
Method to map this Extractor[T] into an Extractor[U].
Type parameters
- U
-
the underlying type of the result.
Value parameters
- f
-
a
T => U.
Attributes
- Returns
-
an
Extractor[U].
Method to create an Extractor[T] such that, if this Extractor[T] fails, then we invoke the (implicit) Extractor[P] instead.
Method to create an Extractor[T] such that, if this Extractor[T] fails, then we invoke the (implicit) Extractor[P] instead.
TESTME
Type parameters
- P
-
the type of the alternative
Extractor.Pmust provide implicit evidence ofExtractor[P], andPmust be a subclass ofT.
Attributes
- Returns
-
an
Extractor[T].
Inherited methods
Appends the given string to the current name, separated by a colon, and updates the name of the current instance.
Appends the given string to the current name, separated by a colon, and updates the name of the current instance.
Value parameters
- w
-
the string to prepend to the current name.
Attributes
- Returns
-
the instance of the current object cast to type E.
- Inherited from:
- NamedFunction
Updates the name of the current instance and returns it as the specified type.
Updates the name of the current instance and returns it as the specified type.
Value parameters
- w
-
the new name to be assigned.
Attributes
- Returns
-
the instance of the current object cast to type E.
- Inherited from:
- NamedFunction
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
NamedFunction -> Any
- Inherited from:
- NamedFunction
Inherited fields
Represents the name attribute of a NamedFunction instance.
Represents the name attribute of a NamedFunction instance.
The name is a mutable string variable with a default value of "unnamed". It can be updated via methods such as ^^ and ^+ in the NamedFunction trait.
Attributes
- Inherited from:
- NamedFunction