All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.threetenjaxb.core.IntegerAsTextXmlAdapter Maven / Gradle / Ivy

The newest version!
package io.github.threetenjaxb.core;

import jakarta.xml.bind.annotation.adapters.XmlAdapter;

/**
 * {@code XmlAdapter} mapping an integer as a string value
 * 

* This adapter is suitable for {@code xsd:gDay} types. * * @see jakarta.xml.bind.annotation.adapters.XmlAdapter */ public class IntegerAsTextXmlAdapter extends XmlAdapter { @Override public Integer unmarshal(String stringValue) { return stringValue != null ? Integer.parseInt(stringValue) : null; } @Override public String marshal(Integer value) { return value != null ? value.toString() : null; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy