class SortedTableFormatter extends TableFormatter
Extension of TableFormatter that sorts the rows by a column before outputting.
- Alphabetic
- By Inheritance
- SortedTableFormatter
- TableFormatter
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SortedTableFormatter(headers: Option[Seq[String]], separator: String = " ", prefix: String = "", suffix: String = "", stripTrailingNewline: Boolean = false, sortColumnIndex: Int = 0)
- headers
optional column headers.
- separator
separator to use between columns.
- prefix
prefix to use before first column.
- suffix
suffix to use after last column.
- sortColumnIndex
index of the column (zero-based) to sort by.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +=(columns: Seq[String]): TableFormatter
Add a row to this table.
Add a row to this table.
- Definition Classes
- TableFormatter
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addRow(columns: String*): TableFormatter
Add a row to this table.
Add a row to this table.
- Definition Classes
- TableFormatter
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val contents: Buffer[Seq[String]]
- Attributes
- protected
- Definition Classes
- TableFormatter
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val headers: Option[Seq[String]]
- Definition Classes
- TableFormatter
- 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
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val prefix: String
- Definition Classes
- TableFormatter
- def print(out: PrintStream): Unit
Prints this table to the specified stream.
- def print(): Unit
Prints this table to stdout.
Prints this table to stdout.
- Definition Classes
- TableFormatter
- def rows: Seq[Seq[String]]
Current contents of this table.
Current contents of this table.
- Definition Classes
- SortedTableFormatter → TableFormatter
- Annotations
- @SuppressWarnings()
- val separator: String
- Definition Classes
- TableFormatter
- val sortColumnIndex: Int
- val stripTrailingNewline: Boolean
- Definition Classes
- TableFormatter
- val suffix: String
- Definition Classes
- TableFormatter
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Formats the contents of this table and returns them as a string.
Formats the contents of this table and returns them as a string.
- Definition Classes
- TableFormatter → AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withPrefix(newPrefix: String): TableFormatter
Creates a new
TableFormatter
, copying the settings from this and with the supplied prefix.Creates a new
TableFormatter
, copying the settings from this and with the supplied prefix.The rows in this table will not be copied to the new table.
- newPrefix
prefix to use before first column.
- returns
An empty table with the updated settings.
- Definition Classes
- TableFormatter
- def withSeparator(newSeparator: String): TableFormatter
Creates a new
TableFormatter
, copying the settings from this and with the supplied separator.Creates a new
TableFormatter
, copying the settings from this and with the supplied separator.The rows in this table will not be copied to the new table.
- newSeparator
separator to use between columns.
- returns
An empty table with the updated settings.
- Definition Classes
- TableFormatter
- def withSortColumnIndex(newSortColumnIndex: Int): SortedTableFormatter
Creates a new
SortedTableFormatter
, copying the settings from this and with the supplied sort column index.Creates a new
SortedTableFormatter
, copying the settings from this and with the supplied sort column index.The rows in this table will not be copied to the new table.
- newSortColumnIndex
index of the column (zero-based) to sort by.
- returns
An empty table with the updated settings.
- def withStripTrailingNewline: TableFormatter
Creates a new
TableFormatter
, copying the settings from this and withstripTrailingNewline
enabled.Creates a new
TableFormatter
, copying the settings from this and withstripTrailingNewline
enabled.The rows in this table will not be copied to the new table.
- returns
An empty table with the updated settings.
- Definition Classes
- TableFormatter
- def withSuffix(newSuffix: String): TableFormatter
Creates a new
TableFormatter
, copying the settings from this and with the supplied suffix.Creates a new
TableFormatter
, copying the settings from this and with the supplied suffix.The rows in this table will not be copied to the new table.
- newSuffix
suffix to use after last column.
- returns
An empty table with the updated settings.
- Definition Classes
- TableFormatter