Form

class Form(val title: Option[String], val rows: Seq[Row], val result: Option[Result]) extends Executable with Text

A Form is a container for Rows (@see Row) where each row contain some Cell (@see Cell). It has an optional title and possibly no rows.

A Form can be executed by executing each row and collecting the results.

Companion:
object
trait Text
trait Executable
class Object
trait Matchable
class Any

Value members

Concrete methods

override def equals(a: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters:
that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Any
def execute: Result

execute all rows

execute all rows

Returns:

a logical and on all results

execute all rows

execute all rows

Returns:

an executed Form

def executeRows: Seq[Row]
override def hashCode: Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Returns:

the hash code value for this object.

Definition Classes
Any

transform this form to a form that will be added as a element inside another form

transform this form to a form that will be added as a element inside another form

def sequence(f1: Iterable[Form], f2: Iterable[Form]): Form
def sequence[T](f1: Seq[T], f2: Seq[T])(using evidence$5: HasForm[T]): Form
def set(f1: Iterable[Form], f2: Iterable[Form]): Form
def set[T](f1: Seq[T], f2: Seq[T])(using evidence$4: HasForm[T]): Form
Returns:

a Form where every Row is executed with a Failure

Returns:

a Form where every Row is executed with a Pending

def setResult(r: Result): Form
Returns:

a Form where every Row is executed with a given Result

Returns:

a Form where every Row is executed with a Skipped

Returns:

a Form where every Row is executed with a Success

def subsequence(f1: Iterable[Form], f2: Iterable[Form]): Form
def subsequence[T](f1: Seq[T], f2: Seq[T])(using evidence$3: HasForm[T]): Form
def subset(f1: Iterable[Form], f2: Iterable[Form]): Form
def subset[T1, T2](f1: Seq[T1], f2: Seq[T2])(using evidence$1: HasForm[T1], evidence$2: HasForm[T2]): Form
def tabs[T](values: Seq[T])(f: T => Tabs): Form

create new tabs in the Form

create new tabs in the Form

def text: String
Returns:

the printed form with a padding space size to use for each cell

def th(hs: Seq[Field[_]]): Form

add a new Header with some fields

add a new Header with some fields

def th(h1: Field[_], hs: Field[_]*): Form

add a new Header, with at least one Field

add a new Header, with at least one Field

def th(hs: Seq[String]): Form

add a new Header

add a new Header

def th(h1: String, hs: String*): Form

add a new Header, with at least one Field

add a new Header, with at least one Field

def toCellXml(using args: Arguments): NodeSeq
Returns:

an xml description of this form, to be embedded in a Cell

def toEffect(label: String): Effect[Form]

encapsulate this form into an effect

encapsulate this form into an effect

def toProp(label: String): Prop[Form, Any]

encapsulate this form into a Prop

encapsulate this form into a Prop

def toXml(using args: Arguments): NodeSeq
Returns:

an xml description of this form

def tr(c1: Cell, cs: Cell*): Form

add a new Row, with at least one Cell

add a new Row, with at least one Cell

def tr(row: Row): Form

add a new Row

add a new Row

def trs[T](values: Seq[T])(f: T => Row): Form

create new rows in the Form

create new rows in the Form

Inherited methods

def map(f: Result => Result): Executable

modify the result to return

modify the result to return

Inherited from:
Executable
def width: Int
Returns:

the width of the cell, without borders when it's a FormCell

Inherited from:
Text

Concrete fields

lazy val allRows: Seq[Row]
Returns:

all rows, including the header

lazy val maxSizes: Seq[Int]
Returns:

the maximum cell size, column by column

val result: Option[Result]
val rows: Seq[Row]
val title: Option[String]