Java tutorial
/******************************************************************************* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package com.jaspersoft.studio.editor.preview.input.array.number; import java.util.Locale; import org.apache.commons.validator.routines.DoubleValidator; public class DoubleElement extends ANumberElement { @Override public Class<?> getSupportedType() { return Double.class; } protected boolean isValid(String number) { return DoubleValidator.getInstance().isValid(number, Locale.US); } @Override protected Object convertString(String str) { return new Double(str); } }