Package ffx.utilities

Class DoubleXMLAdapter

java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Double>
ffx.utilities.DoubleXMLAdapter

public class DoubleXMLAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Double>
Convert a Double to a String and vice versa for use with JAXB.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • XmlAdapter
  • Constructor Details

    • DoubleXMLAdapter

      public DoubleXMLAdapter()
      Default constructor.
  • Method Details

    • unmarshal

      public Double unmarshal(@Nullable String v)
      Unmarshel the Double
      Specified by:
      unmarshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Double>
      Parameters:
      v - The string containing the double.
      Returns:
      The double value or null of the String is empty or "null".
    • marshal

      public String marshal(@Nullable Double v)
      Specified by:
      marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,Double>