T
- the concrete typepublic abstract static class MatrixEditor.NumericElementFormat<T extends java.lang.Number> extends MatrixElementFormat<T>
Number
objects in a matrix.MatrixEditor.IntegerElementFormat
,
MatrixEditor.LongElementFormat
,
MatrixEditor.FloatElementFormat
,
MatrixEditor.DoubleElementFormat
Constructor and Description |
---|
MatrixEditor.NumericElementFormat()
Creates a new numeric element format.
|
MatrixEditor.NumericElementFormat(java.lang.String infinityChar)
Creates a new numeric element format.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(T element)
Formats the given element.
|
protected abstract T |
getInfinity()
Gets the value of infinity.
|
T |
parse(java.lang.String element)
Parses the given text representation to a concrete element.
|
protected abstract T |
parseElement(java.lang.String element)
Parses the given element.
|
public MatrixEditor.NumericElementFormat()
public MatrixEditor.NumericElementFormat(java.lang.String infinityChar) throws java.lang.IllegalArgumentException
infinityChar
- the character that represents infinityjava.lang.IllegalArgumentException
- public java.lang.String format(T element)
MatrixElementFormat
format
in class MatrixElementFormat<T extends java.lang.Number>
element
- the element or null
for a null elementpublic T parse(java.lang.String element)
MatrixElementFormat
parse
in class MatrixElementFormat<T extends java.lang.Number>
element
- the text representation of the elementnull
if the element could not be parsedprotected abstract T getInfinity()
protected abstract T parseElement(java.lang.String element) throws java.text.ParseException
element
- the text representation of the elementjava.text.ParseException
-