Writable

com.phasmidsoftware.tableparser.core.write.Writable
See theWritable companion object
trait Writable[O]

Trait to enable rendering of a table to a sequential (non-hierarchical) output format. A typeclass.

Type parameters

O

the underlying type, for example, a StringBuilder.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait WritableCrypt[O]

Members list

Value members

Abstract methods

def unit: O

Method to return an empty (i.e. new) instance of O

Method to return an empty (i.e. new) instance of O

Attributes

def writeRaw(o: O)(x: CharSequence): O

Method to write a character sequence to the given instance o.

Method to write a character sequence to the given instance o.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

Concrete methods

def close(o: O): Unit

Method to close this Writable, if appropriate.

Method to close this Writable, if appropriate.

Attributes

def delimiter: CharSequence

The default delimiter is a comma followed by a space.

The default delimiter is a comma followed by a space.

Attributes

Returns

", "

def newline: CharSequence

The default newline character is the newline.

The default newline character is the newline.

Attributes

Returns

\n

def quote: CharSequence

The default quote is one double-quote symbol

The default quote is one double-quote symbol

Attributes

Returns

"

def writeQuoted(o: O)(x: CharSequence): O

Method to write a character sequence to the given instance o, but within quotes. Any quote characters in x will be doubled.

Method to write a character sequence to the given instance o, but within quotes. Any quote characters in x will be doubled.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

def writeRawLine(o: O)(x: CharSequence): O

Method to write a character sequence to the given instance o followed by a newline.

Method to write a character sequence to the given instance o followed by a newline.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

def writeRow[Row <: Product](o: O)(x: Row): O

Method to write a value of type Any to the given instance o, possibly quoted.

Method to write a value of type Any to the given instance o, possibly quoted.

Value parameters

o

the instance of O whither the xs values should be written.

x

the row instance to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

def writeRowElements(o: O)(xs: Seq[Any]): O

Method to write a value of type Any to the given instance o, possibly quoted. Elements will be separated by the delimiter, but no newline is appended. Element strings may be enclosed in quotes if appropriate.

Method to write a value of type Any to the given instance o, possibly quoted. Elements will be separated by the delimiter, but no newline is appended. Element strings may be enclosed in quotes if appropriate.

Value parameters

o

the instance of O whither the xs values should be written.

xs

the sequence of elements (values) to be written.

Attributes

Returns

an instance of O which represents the updated output structure.

def writeValue(o: O)(x: Any): O

Method to write a value of type Any to the given instance o, possibly quoted.

Method to write a value of type Any to the given instance o, possibly quoted.

Value parameters

o

the instance of O whither the parameter x should be written.

x

the character sequence to be written.

Attributes

Returns

an instance of O which represents the updated output structure.