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

com.github.debugthug.converters.DoubleConverterTest Maven / Gradle / Ivy

package com.github.debugthug.converters;

import com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter;

public class DoubleConverterTest extends AbstractSingleValueConverter {

	@SuppressWarnings("rawtypes")
	public boolean canConvert(Class type) {

		return type.equals(double.class) || type.equals(Double.class);

	}

	public Object fromString(String str) {

		if (str.compareTo("") == 0)

			str = "0";

		return Double.parseDouble(str);

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy