Modifier and Type | Field and Description |
---|---|
static int |
FULL
This flag as the argument to setMatrixType, indicates that the
full matrix is to be printed.
|
static int |
LOWER_TRIANGULAR
This flag as the argument to setMatrixType, indicates that
only the lower triangular elements of the matrix are to be printed.
|
static int |
STRICT_LOWER_TRIANGULAR
This flag as the argument to setMatrixType, indicates that
only the strict lower triangular elements of the matrix are to be printed.
|
static int |
STRICT_UPPER_TRIANGULAR
This flag as the argument to setMatrixType, indicates that
only the strict upper triangular elements of the matrix are to be printed.
|
static int |
UPPER_TRIANGULAR
This flag as the argument to setMatrixType, indicates that
only the upper triangular elements of the matrix are to be printed.
|
Constructor and Description |
---|
PrintMatrix()
Creates an instance of the PrintMatrix class.
|
PrintMatrix(PrintStream out)
Creates an instance of the PrintMatrix class with the specified PrintStream.
|
PrintMatrix(PrintStream out,
String title)
Creates a PrintMatrix object with the specified PrintStream and
sets its title.
|
PrintMatrix(String title)
Creates a PrintMatrix object and sets its title.
|
Modifier and Type | Method and Description |
---|---|
void |
print(Object array)
Prints an nRows by nColumns matrix with specified format.
|
void |
print(PrintMatrixFormat pmf,
Object array)
Prints an nRows by nColumns matrix with specified format.
|
protected void |
print(String string)
Print a string.
|
void |
printHTML(PrintMatrixFormat pmf,
Object array,
int nRows,
int nColumns)
Prints an nRows by nColumns matrix with specified format for HTML output.
|
protected void |
println()
Print a newline.
|
PrintMatrix |
setColumnSpacing(int columnSpacing)
Sets the number of spaces between columns.
|
PrintMatrix |
setEqualColumnWidths(boolean equalColumnWidths)
Force all of the columns to have the same width.
|
PrintMatrix |
setMatrixType(int matrixType)
Set matrix type.
|
PrintMatrix |
setPageWidth(int pageWidth)
Sets the page width.
|
PrintMatrix |
setTitle(String title)
Sets matrix title
|
public static final int FULL
setMatrixType(int)
,
Constant Field Valuespublic static final int LOWER_TRIANGULAR
setMatrixType(int)
,
Constant Field Valuespublic static final int STRICT_LOWER_TRIANGULAR
setMatrixType(int)
,
Constant Field Valuespublic static final int STRICT_UPPER_TRIANGULAR
setMatrixType(int)
,
Constant Field Valuespublic static final int UPPER_TRIANGULAR
setMatrixType(int)
,
Constant Field Valuespublic PrintMatrix()
public PrintMatrix(PrintStream out)
out
- a PrintStream
public PrintMatrix(PrintStream out, String title)
out
- a PrintStream
title
- a String
specifying the titlepublic PrintMatrix(String title)
title
- a String
specifying the titlepublic void print(Object array)
array
- a two-dimensional, non-empty, rectangular arraypublic void print(PrintMatrixFormat pmf, Object array)
pmf
- a PrintMatrixFormat
matrix formatarray
- a two-dimensional, non-empty, rectangular arrayprotected void print(String string)
string
- the String
to be printedpublic void printHTML(PrintMatrixFormat pmf, Object array, int nRows, int nColumns)
pmf
- a PrintMatrixFormat
matrix formatnRows
- an int
specifying the number of rows in the matrixnColumns
- an int
specifying the number of columns in the matrixprotected void println()
public PrintMatrix setColumnSpacing(int columnSpacing)
columnSpacing
- an int
specifying the number of spaces
between columns, default is 2PrintMatrix
objectpublic PrintMatrix setEqualColumnWidths(boolean equalColumnWidths)
equalColumnWidths
- a boolean
which specifies that all column
widths will be equalPrintMatrix
objectpublic PrintMatrix setMatrixType(int matrixType)
matrixType
- int
specifying the matrix type.
Values for matrixType are:0 | FULL |
1 | UPPER_TRIANGULAR |
2 | LOWER_TRIANGULAR |
3 | STRICT_UPPER_TRIANGULAR |
4 | STRICT_LOWER_TRIANGULAR |
PrintMatrix
objectpublic PrintMatrix setPageWidth(int pageWidth)
pageWidth
- an int
specifying the page width,
default is the largest possible integerPrintMatrix
objectpublic PrintMatrix setTitle(String title)
title
- a String
specifying the title of the matrixPrintMatrix
objectCopyright © 1970-2015 Rogue Wave Software
Built October 13 2015.