Code example for NumberFormat

Methods: parse

0
	protected Operand<Number> parseOperand(String token) {
		 
		Number n = null;
		try { 
			 
			n = this.numberFormat.parse(token);
			 
		} catch (ParseException e) {
 
			e.printStackTrace();
			 
			return new NumericOperand(Double.NaN); //If we fail to parse the number, an NaN is returned.
		} 
		 
		return new NumericOperand(n);
	} 
 
	 
	 
 
}