diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2013-07-19 23:35:46 +0200 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2013-07-20 18:16:58 +0200 |
commit | 0a3f340042e77b171783d97a8029ebf8e1974eb0 (patch) | |
tree | 1952a4126887cede3d49a5c2633826eb2b5610e9 /src/reflect | |
parent | dde9e9003655b4ee8128bc4e64e4e2b72cb58699 (diff) | |
download | scala-0a3f340042e77b171783d97a8029ebf8e1974eb0.tar.gz scala-0a3f340042e77b171783d97a8029ebf8e1974eb0.tar.bz2 scala-0a3f340042e77b171783d97a8029ebf8e1974eb0.zip |
SI-7681 Clean up scala.reflect.internal.util.TableDef
... now that scala.tools.nsc.Phases is gone.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/util/TableDef.scala | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/reflect/scala/reflect/internal/util/TableDef.scala b/src/reflect/scala/reflect/internal/util/TableDef.scala index 1626da2c93..e97aa662d8 100644 --- a/src/reflect/scala/reflect/internal/util/TableDef.scala +++ b/src/reflect/scala/reflect/internal/util/TableDef.scala @@ -5,27 +5,24 @@ import TableDef._ import scala.language.postfixOps /** A class for representing tabular data in a way that preserves - * its inner beauty. See Exceptional for an example usage. + * its inner beauty. * One creates an instance of TableDef by defining the columns of * the table, then uses that to create an instance of Table by * passing in a sequence of rows. */ class TableDef[T](_cols: Column[T]*) { - /** These operators are about all there is to it. - * - * ~ appends a column to the table - * >> creates a right-justified column and appends it - * << creates a left-justified column and appends it - * >+ specifies a string to separate the previous column from the next. - * if none is specified, a space is used. - */ + // These operators are about all there is to it. + /** Appends a column to the table. */ def ~(next: Column[T]) = retThis(cols :+= next) + /** Creates a right-justified column and appends it. */ def >>(pair: (String, T => Any)) = this ~ Column(pair._1, pair._2, left = false) + /** Creates a left-justified column and appends it. */ def <<(pair: (String, T => Any)) = this ~ Column(pair._1, pair._2, left = true) + /** Specifies a string to separate the previous column from the next. + * If none is specified, a space is used. */ def >+(sep: String) = retThis(separators += ((cols.size - 1, sep))) - /** Below this point should all be considered private/internal. - */ + // Below this point should all be considered private/internal. private var cols: List[Column[T]] = _cols.toList private var separators: Map[Int, String] = Map() |