trait Table extends AnyRef
Defines table.
How to Create Table
A Table
can be created using a factory defined in companion object, or it
can be built incrementally using a TableBuilder
.
The two tables created in the example below are effectively the same.
// Create table with data supplied as Seq[Seq[String]] val table1 = t2.Table( Seq( Seq("#", "Effective Date", "Currency Code", "Exchange Rate"), Seq("1", "2021-01-04", "USD", "0.690236"), Seq("2", "2021-01-05", "USD", "0.690627"), Seq("3", "2021-01-06", "USD", "0.689332") ) ) // Incrementally build table by adding value sequences val table2 = t2.TableBuilder() .add("#", "Effective Date", "Currency Code", "Exchange Rate") .add("1", "2021-01-04", "USD", "0.690236") .add("2", "2021-01-05", "USD", "0.690627") .add("3", "2021-01-06", "USD", "0.689332") .build() // Assert equality assert(table1.rows == table2.rows)
- See also
- Alphabetic
- By Inheritance
- Table
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
apply(row: Int, column: Int): String
Gets value at given location.
Gets value at given location.
- row
row index
- column
column index
-
abstract
def
column(index: Int): Seq[String]
Gets column values at given index.
Gets column values at given index.
- index
column index
-
abstract
def
columnCount: Int
Gets column count.
-
abstract
def
columns: Seq[Seq[String]]
Gets column-oriented data.
-
abstract
def
row(index: Int): Seq[String]
Gets row values at given index.
Gets row values at given index.
- index
row index
-
abstract
def
rowCount: Int
Gets row count.
-
abstract
def
rows: Seq[Seq[String]]
Gets row-oriented data.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()