Package org.olap4j.layout
Class RectangularCellSetFormatter
java.lang.Object
org.olap4j.layout.RectangularCellSetFormatter
- All Implemented Interfaces:
CellSetFormatter
Formatter that can convert a
CellSet
into a two-dimensional text
layout.
With non-compact layout:
| 1997 | | Q1 | Q2 | | | 4 | | Unit Sales | Store Sales | Unit Sales | Store Sales | ----+----+---------+------------+-------------+------------+-------------+ USA | CA | Modesto | 12 | 34.5 | 13 | 35.60 | | WA | Seattle | 12 | 34.5 | 13 | 35.60 | | CA | Fresno | 12 | 34.5 | 13 | 35.60 |
With compact layout:
1997 Q1 Q2 4 Unit Sales Store Sales Unit Sales Store Sales === == ======= ========== =========== ========== =========== USA CA Modesto 12 34.5 13 35.60 WA Seattle 12 34.5 13 35.60 CA Fresno 12 34.5 13 35.60
This class is experimental. It is not part of the olap4j specification and is subject to change without notice.
- Since:
- Apr 15, 2009
- Author:
- jhyde
-
Constructor Summary
ConstructorsConstructorDescriptionRectangularCellSetFormatter
(boolean compact) Creates a RectangularCellSetFormatter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
format
(CellSet cellSet, PrintWriter pw) Formats a CellSet as text to a PrintWriter.
-
Constructor Details
-
RectangularCellSetFormatter
public RectangularCellSetFormatter(boolean compact) Creates a RectangularCellSetFormatter.- Parameters:
compact
- Whether to generate compact output
-
-
Method Details
-
format
Description copied from interface:CellSetFormatter
Formats a CellSet as text to a PrintWriter.- Specified by:
format
in interfaceCellSetFormatter
- Parameters:
cellSet
- Cell setpw
- Print writer
-