Class NumberAdapter
XML adapter that converts between a String representation and a generic Number.
Used to serialize Number-typed fields of generic classes (e.g.
Attribute) where the concrete numeric type cannot be
recovered at unmarshalling time. The adapter always returns a Double when the value
contains a decimal point (or scientific notation) and a Long otherwise. Consumers are
expected to convert the returned Number to the desired concrete type via
Number.floatValue(), Number.longValue(), etc.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NumberAdapter
public NumberAdapter()
-
-
Method Details
-
marshal
-
unmarshal
-