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

com.redijedi.tapestry.internal.DoubleValueEncoder Maven / Gradle / Ivy

The newest version!
package com.redijedi.tapestry.internal;

import org.apache.tapestry.ValueEncoder;

/**
 * @author torr
 * 
 */
public class DoubleValueEncoder implements ValueEncoder {

	public String toClient(Double value) {
		return value == null ? "" : value.toString();
	}

	public Double toValue(String clientValue) {
		try {
			return new Double(clientValue);
		} catch (NumberFormatException e) {
			return null;
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy