MultiExtractorBase

com.phasmidsoftware.xmldoc.xml.MultiExtractorBase
See theMultiExtractorBase companion object
case class MultiExtractorBase[P](range: Range)(using evidence$1: Extractor[P]) extends MultiExtractor[Seq[P]]

MultiExtractorBase class to deal with minimum and maximum numbers of elements. This is not used for situations where different subtypes are grouped together (for example, Folder can contain any number of "Features," which can be of type Container, Document, Folder, or Placemark.)

Type parameters

P

element type of the MultiExtractor to be returned. requires implicit evidence of Extractor[P].

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait MultiExtractor[Seq[P]]
trait NamedFunction[MultiExtractor[Seq[P]]]
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Concrete methods

def extract(nodeSeq: NodeSeq): Try[Seq[P]]

Extracts a sequence of elements of type P from the provided NodeSeq, ensuring that the number of extracted elements falls within a specified range. If the extraction succeeds but the resulting sequence does not meet the range requirements, a failure is returned. Non-fatal issues during the extraction are logged and ignored.

Extracts a sequence of elements of type P from the provided NodeSeq, ensuring that the number of extracted elements falls within a specified range. If the extraction succeeds but the resulting sequence does not meet the range requirements, a failure is returned. Non-fatal issues during the extraction are logged and ignored.

Value parameters

nodeSeq

the sequence of XML nodes from which elements of type P are to be extracted.

Attributes

Returns

a Try containing a sequence of extracted elements of type P if successful and the number of elements is within the specified range; otherwise, a failure with the corresponding exception.

Inherited methods

def ^+(w: String): MultiExtractor[Seq[P]]

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): MultiExtractor[Seq[P]]

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 productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
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

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