Code example for NumberFormat

Methods: parse

0
 
		protected Object getValue (String aString)
		{ 
			try 
			{ 
				Number theNumber = itsNumberFormat.parse(aString);
				return theNumber;
			} 
			catch (ParseException e)
			{ 
				return new Double (Double.NaN);
			} 
		} 
 
		protected boolean isInputValid (String aString)
		{ 
			try 
			{ 
				itsNumberFormat.parse(aString);
				return true; 
			}