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

com.thoughtworks.xstream.converters.basic.BigDecimalConverter Maven / Gradle / Ivy

package com.thoughtworks.xstream.converters.basic;

import java.math.BigDecimal;

/**
 * Converts a java.math.BigDecimal to a String, retaining
 * its precision.
 *
 * @author Joe Walnes
 */
public class BigDecimalConverter extends AbstractBasicConverter {

    public boolean canConvert(Class type) {
        return type.equals(BigDecimal.class);
    }

    protected Object fromString(String str) {
        return new BigDecimal(str);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy