|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.text.math.IndexPairFormatV1<R,C>
R
- the row index type.C
- the column index type.public final class IndexPairFormatV1<R,C>
This class is a concrete implementation of IndexPairFormat.
The string representation of indices used by this class is:
[RowIndex | ColumnIndex]
.
Constructor Summary | |
---|---|
IndexPairFormatV1(SimpleFormat<R> rowIndexFormat,
SimpleFormat<C> columnIndexFormat)
Constructs a new index pair format. |
Method Summary | |
---|---|
java.lang.String |
format(IndexPair<R,C> indexPair)
Returns a formatted string representation of the provided index pair. |
java.lang.String |
formatPair(IndexPair<? extends R,? extends C> indexPair)
Returns a formatted string representation of the provided index pair. |
SimpleFormat<C> |
getColumnIndexFormat()
Returns the format used for column indices. |
SimpleFormat<R> |
getRowIndexFormat()
Returns the format used for row indices. |
IndexPair<R,C> |
parse(java.lang.String indexPair)
Parses the provided string and returns its corresponding index pair. |
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 IndexPairFormatV1(SimpleFormat<R> rowIndexFormat, SimpleFormat<C> columnIndexFormat)
rowIndexFormat
- the row index formatter.columnIndexFormat
- the column index formatter.Method Detail |
---|
public SimpleFormat<R> getRowIndexFormat()
public SimpleFormat<C> getColumnIndexFormat()
public java.lang.String formatPair(IndexPair<? extends R,? extends C> indexPair)
indexPair
- the index pair to be formatted.
public java.lang.String format(IndexPair<R,C> indexPair)
indexPair
- the index pair to be formatted.
public IndexPair<R,C> parse(java.lang.String indexPair)
parse
in interface Parser<IndexPair<R,C>>
indexPair
- the string to be parsed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |