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

javax.xml.bind.BigIntegerIntegerAdapter Maven / Gradle / Ivy

There is a newer version: 0.0.4
Show newest version
package javax.xml.bind;

import java.math.BigInteger;

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

public class BigIntegerIntegerAdapter extends XmlAdapter{

	@Override
	public Integer unmarshal(BigInteger v) throws Exception {
		if(v == null) return null;
		else return v.intValueExact();
	}

	@Override
	public BigInteger marshal(Integer v) throws Exception {
		if(v==null) return null;
		else return BigInteger.valueOf(v);
	}

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy