Class/Object

software.purpledragon.text

SortedTableFormatter

Related Docs: object SortedTableFormatter | package text

Permalink

class SortedTableFormatter extends TableFormatter

Extension of TableFormatter that sorts the rows by a column before outputting.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SortedTableFormatter
  2. TableFormatter
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SortedTableFormatter(headers: Option[Seq[String]], separator: String = " ", prefix: String = "", suffix: String = "", stripTrailingNewline: Boolean = false, sortColumnIndex: Int = 0)

    Permalink

    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

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +=(columns: Seq[String]): TableFormatter

    Permalink

    Add a row to this table.

    Add a row to this table.

    Definition Classes
    TableFormatter
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def addRow(columns: String*): TableFormatter

    Permalink

    Add a row to this table.

    Add a row to this table.

    Definition Classes
    TableFormatter
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  8. val contents: Buffer[Seq[String]]

    Permalink
    Attributes
    protected
    Definition Classes
    TableFormatter
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  13. val headers: Option[Seq[String]]

    Permalink

    optional column headers.

    optional column headers.

    Definition Classes
    TableFormatter
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. val prefix: String

    Permalink

    prefix to use before first column.

    prefix to use before first column.

    Definition Classes
    TableFormatter
  19. def print(out: PrintStream): Unit

    Permalink

    Prints this table to the specified stream.

    Prints this table to the specified stream.

    out

    stream to print to.

    Definition Classes
    TableFormatter
  20. def print(): Unit

    Permalink

    Prints this table to stdout.

    Prints this table to stdout.

    Definition Classes
    TableFormatter
  21. def rows: Seq[Seq[String]]

    Permalink

    Current contents of this table.

    Current contents of this table.

    Definition Classes
    SortedTableFormatterTableFormatter
  22. val separator: String

    Permalink

    separator to use between columns.

    separator to use between columns.

    Definition Classes
    TableFormatter
  23. val sortColumnIndex: Int

    Permalink

    index of the column (zero-based) to sort by.

  24. val stripTrailingNewline: Boolean

    Permalink

    if true then no newline will be output after the last row.

    if true then no newline will be output after the last row.

    Definition Classes
    TableFormatter
  25. val suffix: String

    Permalink

    suffix to use after last column.

    suffix to use after last column.

    Definition Classes
    TableFormatter
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink

    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
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def withPrefix(prefix: String): TableFormatter

    Permalink

    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.

    prefix

    prefix to use before first column.

    returns

    An empty table with the updated settings.

    Definition Classes
    TableFormatter
  32. def withSeparator(separator: String): TableFormatter

    Permalink

    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.

    separator

    separator to use between columns.

    returns

    An empty table with the updated settings.

    Definition Classes
    TableFormatter
  33. def withSortColumnIndex(sortColumnIndex: Int): SortedTableFormatter

    Permalink

    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.

    sortColumnIndex

    index of the column (zero-based) to sort by.

    returns

    An empty table with the updated settings.

  34. def withStripTrailingNewline: TableFormatter

    Permalink

    Creates a new TableFormatter, copying the settings from this and with stripTrailingNewline enabled.

    Creates a new TableFormatter, copying the settings from this and with stripTrailingNewline 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
  35. def withSuffix(suffix: String): TableFormatter

    Permalink

    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.

    suffix

    suffix to use after last column.

    returns

    An empty table with the updated settings.

    Definition Classes
    TableFormatter

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from TableFormatter

Inherited from AnyRef

Inherited from Any

Ungrouped