RawRowProjection

com.phasmidsoftware.tableparser.core.table.RawRowProjection
case class RawRowProjection(columns: Seq[Int]) extends Transformation[RawRow, RawRow]

A case class RawRowProjection that transforms a RawRow into another RawRow by selecting specific columns.

This transformation operates based on the specified indices of the columns to be kept. It selects the raw string values (ws) of the input RawRow corresponding to the provided indices and produces a new RawRow with the filtered data, while retaining the header from the input.

Value parameters

columns

A sequence of integers representing column indices to retain in the transformation.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait RawRow => RawRow
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply(r: RawRow): RawRow

Transforms a given RawRow into a new RawRow by selectively retaining columns based on the indices specified in the columns parameter of the enclosing RawRowProjection class.

Transforms a given RawRow into a new RawRow by selectively retaining columns based on the indices specified in the columns parameter of the enclosing RawRowProjection class.

For each value in the input row (r), if its corresponding column index exists in the columns sequence, it is included in the resulting RawRow. The header of the resulting RawRow remains unchanged.

Value parameters

r

the input RawRow containing a sequence of strings (ws) and a header (header).

Attributes

Returns

a new RawRow that contains only the filtered values as per the specified column indices and retains the original header from the input row.

Inherited methods

def andThen[A](g: RawRow => A): RawRow => A

Composes two instances of Function1 in a new Function1, with this function applied first.

Composes two instances of Function1 in a new Function1, with this function applied first.

Type parameters

A

the result type of function g

Value parameters

g

a function R => A

Attributes

Returns

a new function f such that f(x) == g(apply(x))

Inherited from:
Function1
def compose[A](g: A => RawRow): A => RawRow

Composes two instances of Function1 in a new Function1, with this function applied last.

Composes two instances of Function1 in a new Function1, with this function applied last.

Type parameters

A

the type to which function g can be applied

Value parameters

g

a function A => T1

Attributes

Returns

a new function f such that f(x) == apply(g(x))

Inherited from:
Function1
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
Function1 -> Any
Inherited from:
Function1