@Override
	public int hashCode() {
		if (value == null) {
			return 31;
		}
		// Using recommended hashing algorithm from Effective Java for longs and
		// doubles
		if (isIntegral(this)) {
			long value = getAsNumber().longValue();
			return (int) (value ^ (value >>> 32));
		}
		if (isFloatingPoint(this)) {
			long value = Double.doubleToLongBits(getAsNumber().doubleValue());
			return (int) (value ^ (value >>> 32));
		}
		return value.hashCode();
	}