Here you can find the source of toIntFormat(String value)
Parameter | Description |
---|---|
value | string holding a double value in the form D.DDDDDDD |
static protected Integer toIntFormat(String value)
//package com.java2s; /******************************************************************************* * Copyright (c) 2006 IBM Corporation and others. * All rights reserved. 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 * * Contributors:/*from w w w.j a v a2s . co m*/ * IBM Corporation - initial API and implementation *******************************************************************************/ public class Main { /** * Convert from a String holding a double value of the form D.DDDDDDD into * an Integer of the form : DDDDDDDD * * @param value * string holding a double value in the form D.DDDDDDD * * @return an Integer value in form DDDDDDDD */ static protected Integer toIntFormat(String value) { Double dVal = Double.valueOf(value); return Integer.valueOf((int) (100000000.0 * dVal.doubleValue())); } }