Header

com.phasmidsoftware.tableparser.core.table.Header
See theHeader companion class
object Header

This companion object contains utility methods and constants for creating and manipulating instances of the Header class.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Header.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(wss: Seq[Seq[String]]): Header

This method constructs a new Header based on a header spanning several lines. Only the first becomes the true header, the remainder become the "preface."

This method constructs a new Header based on a header spanning several lines. Only the first becomes the true header, the remainder become the "preface."

Value parameters

wss

a sequence of sequence of String.

Attributes

Returns

a Header.

def apply(letters: Boolean, length: Int): Header

This method constructs a new Header based on Excel row/column names.

This method constructs a new Header based on Excel row/column names.

Value parameters

length

the number of columns.

letters

true if we want the sequence A B C D E ... Z AA AB ... BA BB ... false is we just want numbers.

Attributes

Returns

a Header with length column names.

def apply[X]()(using fieldNames: FieldNames[X]): Header

This method constructs a new Header from the names of the fields of the case class X. It should not be considered to be the normal method of generating the header for a table. It is mainly used by unit tests.

This method constructs a new Header from the names of the fields of the case class X. It should not be considered to be the normal method of generating the header for a table. It is mainly used by unit tests.

NOTE: this method does NOT recurse into any fields which happen also to be a class with fields.

Type parameters

X

a case class.

Value parameters

fieldNames

the FieldNames of X (derived from its Mirror).

Attributes

Returns

a Header with the field names of X.

def create(ws: String*): Header

Create a Header from a variable list of parameters.

Create a Header from a variable list of parameters.

Value parameters

ws

a variable list of Strings.

Attributes

Returns

a Header.

Concrete fields

lazy val generateLetters: LazyList[String]

Column names as in a spreadsheet, by letter: A B C ... Z AA AB ... AZ BA ... ZZ AAA ...

Column names as in a spreadsheet, by letter: A B C ... Z AA AB ... AZ BA ... ZZ AAA ...

Attributes

lazy val generateNumbers: LazyList[String]

Column names as in a spreadsheet, by number: 1 2 3 ...

Column names as in a spreadsheet, by number: 1 2 3 ...

Attributes