N
- the number typepublic abstract class NumberPropertyEditor<N extends Number> extends PropertyEditor<N>
Modifier and Type | Class and Description |
---|---|
static class |
NumberPropertyEditor.BigDecimalPropertyEditor
A number property editor for use with
BigDecimal . |
static class |
NumberPropertyEditor.BigIntegerPropertyEditor
A number property editor for use with
BigInteger . |
static class |
NumberPropertyEditor.DoublePropertyEditor
A number property editor for use with
Double . |
static class |
NumberPropertyEditor.FloatPropertyEditor
A number property editor for use with
Float . |
static class |
NumberPropertyEditor.IntegerPropertyEditor
A number property editor for use with
Integer . |
static class |
NumberPropertyEditor.LongPropertyEditor
A number property editor for use with
Long . |
static class |
NumberPropertyEditor.ShortPropertyEditor
A number property editor for use with
Short . |
DEFAULT
Constructor and Description |
---|
NumberPropertyEditor(N incrAmount)
Creates a new number property editor with the default number type (Double).
|
NumberPropertyEditor(NumberFormat format,
N incrAmount)
Creates a new number property editor.
|
NumberPropertyEditor(String pattern,
N incrAmount)
Creates a new number property editor.
|
Modifier and Type | Method and Description |
---|---|
N |
decr(N value)
Decrements a value by the current increment amount.
|
NumberFormat |
getFormat()
Returns the editor's format.
|
N |
getIncrement()
Gets the current increment amount.
|
N |
incr(N value)
Increments a value by the current increment amount.
|
N |
parse(CharSequence text) |
String |
render(Number value) |
void |
setFormat(NumberFormat format)
Sets the editor's format.
|
void |
setIncrement(N value)
Sets the increment amount (defaults to zero).
|
render
public NumberPropertyEditor(N incrAmount)
public NumberPropertyEditor(NumberFormat format, N incrAmount)
format
- the number formatpublic N decr(N value)
value
- the value to decrementpublic NumberFormat getFormat()
public N getIncrement()
public N incr(N value)
value
- the value to incrementpublic N parse(CharSequence text) throws ParseException
ParseException
public void setFormat(NumberFormat format)
format
- the formatpublic void setIncrement(N value)
value
- the new increment amountCopyright © 2015. All rights reserved.