SubclassExtractor

com.phasmidsoftware.xmldoc.xml.SubclassExtractor
class SubclassExtractor[T](val labels: Seq[String])(implicit tsm: MultiExtractor[Seq[T]]) extends Extractor[Seq[T]]

Class which extends an Extractor of Seq[T].

NOTE: used by subclassExtractor1 method (itself unused).

Type parameters

T

the type to be constructed.

Value parameters

labels

a set of labels (tags)

tsm

an (implicit) MultiExtractor of Seq[T].

Attributes

Graph
Supertypes
trait Extractor[Seq[T]]
trait NamedFunction[Extractor[Seq[T]]]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def extract(node: Node): Try[Seq[T]]

TESTME in particular regarding the use of sequenceForgiving

TESTME in particular regarding the use of sequenceForgiving

Value parameters

node

a Node.

Attributes

Returns

a Try[T].

Inherited methods

def ^+(w: String): Extractor[Seq[T]]

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
def ^^(w: String): Extractor[Seq[T]]

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
def flatMap[U](f: Seq[T] => Try[U]): Extractor[U]

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

Inherited from:
Extractor
def lift: Extractor[Option[Seq[T]]]

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 an Option[T] from a Node.

Inherited from:
Extractor
def map[U](f: Seq[T] => U): Extractor[U]

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

Inherited from:
Extractor
override def toString: String

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
def |[P <: Seq[T] : Extractor](): Extractor[Seq[T]]

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. P must provide implicit evidence of Extractor[P], and P must be a subclass of T.

Attributes

Returns

an Extractor[T].

Inherited from:
Extractor

Concrete fields

val labels: Seq[String]

Inherited fields

var name: String

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