|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.text.math.MatrixElementFormatV1<R,C>
R
- the row index type.C
- the column index type.public final class MatrixElementFormatV1<R,C>
This class is a concrete implementation of MatrixElementFormat.
The string representation of matrix elements used by this class is:
[RowIndex | ColumnIndex] = Element
.
Constructor Summary | |
---|---|
MatrixElementFormatV1(SimpleFormat<R> rowIndexFormat,
SimpleFormat<C> columnIndexFormat)
Constructs a new matrix element format. |
Method Summary | |
---|---|
java.lang.String |
format(MatrixElement<R,C,java.lang.Double> indexPair)
Returns a formatted string representation of the provided matrix element. |
java.lang.String |
formatElement(MatrixElement<? extends R,? extends C,java.lang.Double> element)
Returns a formatted string representation of the provided matrix element. |
DoubleFormatV1 |
getElementFormat()
Returns the format used for matrix elements. |
IndexPairFormatV1<R,C> |
getIndexFormat()
Returns the format used for matrix elements. |
MatrixElement<R,C,java.lang.Double> |
parse(java.lang.String element)
Parses the provided string and returns its corresponding matrix element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sbrt.shell.text.Formatter |
---|
format |
Constructor Detail |
---|
public MatrixElementFormatV1(SimpleFormat<R> rowIndexFormat, SimpleFormat<C> columnIndexFormat)
rowIndexFormat
- the row index formatter.columnIndexFormat
- the column index formatter.Method Detail |
---|
public IndexPairFormatV1<R,C> getIndexFormat()
public DoubleFormatV1 getElementFormat()
public java.lang.String formatElement(MatrixElement<? extends R,? extends C,java.lang.Double> element)
element
- the matrix element to be formatted.
public java.lang.String format(MatrixElement<R,C,java.lang.Double> indexPair)
indexPair
- the matrix element to be formatted.
public MatrixElement<R,C,java.lang.Double> parse(java.lang.String element)
parse
in interface Parser<MatrixElement<R,C,java.lang.Double>>
element
- the string to be parsed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |