ScalaDataTable

io.cucumber.scala.Implicits.ScalaDataTable
implicit class ScalaDataTable(table: DataTable)

DataTable extension class providing methods to read a DataTable as Scala types.

Note: we do not filter out null values because users might rely on the keyset in their implementation.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def asScalaList[T](implicit ev: ClassTag[T]): Seq[Option[T]]

Provides a view of the DataTable as a simple list of values. Equivalent of .asList[T](classOf[T]) but returned as Scala collection types without null values.

Provides a view of the DataTable as a simple list of values. Equivalent of .asList[T](classOf[T]) but returned as Scala collection types without null values.

See also asScalaRawList[T] if you don't need Options (for instance if you are using a DataTableType).

Type parameters

T

cell type

Attributes

Returns

list of values

def asScalaList: Seq[Option[String]]

Provides a view of the DataTable as a simple list of values. Equivalent of .asList() but returned as Scala collection types without null values.

Provides a view of the DataTable as a simple list of values. Equivalent of .asList() but returned as Scala collection types without null values.

Attributes

Returns

list of values

def asScalaLists[T](implicit ev: ClassTag[T]): Seq[Seq[Option[T]]]

Provides a view of the DataTable as a matrix. Equivalent of .asLists[T](classOf[T]) but returned as Scala collection types without null values.

Provides a view of the DataTable as a matrix. Equivalent of .asLists[T](classOf[T]) but returned as Scala collection types without null values.

See also asScalaRawLists[T] if you don't need Options (for instance if you are using a DataTableType).

Type parameters

T

cell type

Attributes

Returns

matrix

def asScalaLists: Seq[Seq[Option[String]]]

Provides a view of the DataTable as a matrix. Equivalent of .asLists() but returned as Scala collection types without null values.

Provides a view of the DataTable as a matrix. Equivalent of .asLists() but returned as Scala collection types without null values.

Attributes

Returns

matrix

def asScalaMap[K, V](implicit evK: ClassTag[K], evV: ClassTag[V]): Map[K, Option[V]]

Provides a view of the DataTable as a key-value map where key are the first column values. Equivalent of .asMap[K,V](classOf[K],classOf[V]) but returned as Scala collection types without null values.

Provides a view of the DataTable as a key-value map where key are the first column values. Equivalent of .asMap[K,V](classOf[K],classOf[V]) but returned as Scala collection types without null values.

Type parameters

K

key type

V

value type

Attributes

Returns

key-value map

def asScalaMaps[K, V](implicit evK: ClassTag[K], evV: ClassTag[V]): Seq[Map[K, Option[V]]]

Provides a view of the DataTable as a sequence of rows, each row being a key-value map where key is the column name. Equivalent of .asMaps[K,V](classOf[K], classOf[V]) but returned as Scala collection types without null values.

Provides a view of the DataTable as a sequence of rows, each row being a key-value map where key is the column name. Equivalent of .asMaps[K,V](classOf[K], classOf[V]) but returned as Scala collection types without null values.

See also asScalaRawMaps[T] if you don't need Options (for instance if you are using a DataTableType).

Type parameters

K

key type

V

value type

Attributes

Returns

sequence of rows

def asScalaMaps: Seq[Map[String, Option[String]]]

Provides a view of the DataTable as a sequence of rows, each row being a key-value map where key is the column name. Equivalent of .asMaps() but returned as Scala collection types without null values.

Provides a view of the DataTable as a sequence of rows, each row being a key-value map where key is the column name. Equivalent of .asMaps() but returned as Scala collection types without null values.

Attributes

Returns

sequence of rows

def asScalaRawList[T](implicit ev: ClassTag[T]): Seq[T]

Provides a view of the DataTable as a simple list of values. Equivalent of .asList[T](classOf[T]) but returned as Scala collection types.

Provides a view of the DataTable as a simple list of values. Equivalent of .asList[T](classOf[T]) but returned as Scala collection types.

See also asScalaList[T].

Type parameters

T

cell/row type

Attributes

Returns

list of values

def asScalaRawLists[T](implicit ev: ClassTag[T]): Seq[Seq[T]]

Provides a view of the DataTable as a matrix. Equivalent of .asLists[T](classOf[T]) but returned as Scala collection types.

Provides a view of the DataTable as a matrix. Equivalent of .asLists[T](classOf[T]) but returned as Scala collection types.

See also asScalaLists[T]

Type parameters

T

cell type

Attributes

Returns

matrix

def asScalaRawMaps[K, V](implicit evK: ClassTag[K], evV: ClassTag[V]): Seq[Map[K, V]]

Provides a view of the DataTable as a sequence of rows, each row being a key-value map where key is the column name. Equivalent of .asMaps[K,V](classOf[K], classOf[V]) but returned as Scala collection types.

Provides a view of the DataTable as a sequence of rows, each row being a key-value map where key is the column name. Equivalent of .asMaps[K,V](classOf[K], classOf[V]) but returned as Scala collection types.

See also asScalaMaps[T].

Type parameters

K

key type

V

value type

Attributes

Returns

sequence of rows

def asScalaRowColumnMap[K](implicit evK: ClassTag[K]): Map[K, Map[String, Option[String]]]

Provides a view of the DataTable as a full table: a key-value map of row where keys are the first column values and each row being itself a key-value map where key is the column name.

Provides a view of the DataTable as a full table: a key-value map of row where keys are the first column values and each row being itself a key-value map where key is the column name.

Type parameters

K

key type

Attributes

Returns

map of rows

def asScalaRowColumnMap: Map[String, Map[String, Option[String]]]

Provides a view of the DataTable as a full table: a key-value map of row where keys are the first column values and each row being itself a key-value map where key is the column name.

Provides a view of the DataTable as a full table: a key-value map of row where keys are the first column values and each row being itself a key-value map where key is the column name.

Attributes

Returns

map of rows

def asScalaRowMap[K](implicit evK: ClassTag[K]): Map[K, Seq[Option[String]]]

Provides a view of the DataTable as a key-value map of row where keys are the first column values and each row being a list of values.

Provides a view of the DataTable as a key-value map of row where keys are the first column values and each row being a list of values.

Type parameters

K

key type

Attributes

Returns

map of rows

def asScalaRowMap: Map[String, Seq[Option[String]]]

Provides a view of the DataTable as a key-value map of row where keys are the first column values and each row being a list of values.

Provides a view of the DataTable as a key-value map of row where keys are the first column values and each row being a list of values.

Attributes

Returns

map of rows