All pastes #13706 Raw Edit

Something

public text v1 · immutable
#13706 ·published 2005-06-08 05:23 UTC
rendered paste body
   static public Object evalForJinni(Number fun) {
		if (fun instanceof Integer)	return fun;
		if (fun instanceof Double) return fun;
		double d = fun.doubleValue();
		if (fun instanceof Long) {
			if (d<Integer.MAX_VALUE && d>Integer.MIN_VALUE) {
				return new Integer(fun.intValue());
			}
		}
		return new Double(d);
	}