Ensure if a object is a number.

@param value the objet.
@throws ExecutionException if is not a number.
543945
private static void ensureNumber(Object value) throws ExecutionException {

        if (!isNumber(value)) {
            String message = value.getClass().getCanonicalName() + " can not cast to a Number.";
            LOGGER.error(message);
            throw new ExecutionException(message);
        }
    }
55017
public function assertIsNumericAndNonZero($value, $message='%s must be a number and not 0', $exception='Asserts')
    {
        if (is_numeric($value) === false || floatval($value) <= 0) {
            $this->throwException($exception, $message, $value);
        }
    }
463450
public static boolean isNumberic(Object obj) {
        if (obj == null) {
            Log.e("isNumeric", "parameter can't be null.");
            return false;
        }

        try {
            Double.parseDouble(obj.toString());
        } catch (Exception e) {
            return false;
        }

        return true;
    }
1049942
public static final int getInt(String value)
   {
      return (value == null || value.length() == 0 ? 0 : Integer.parseInt(value));
   }
1130414
static public function numeric($value, $message = null, $propertyPath = null)
        {
            if (!is_numeric($value)) {
                $message = $message ?: sprintf(
                    'Value "%s" is not numeric.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_NUMERIC, $propertyPath);
            }
        }
1337423
function isNumber( value ) {
	return ( typeof value === 'number' || Object.prototype.toString.call( value ) === '[object Number]' ) && value.valueOf() === value.valueOf();
}
389491
function(value){
      return _.isNumber(value) || (_.isString(value) && value.match(defaultPatterns.number));
    }
1139861
public static function isNullOrNumeric($value, $message = null)
    {
        if (!is_null($value) && !is_numeric($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or numeric, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
103920
static int objectType(Object value) {
    if (value instanceof String)
      return STRING;
    else if (value instanceof Boolean) // was BooleanValue
      return BOOLEAN;
    else if (value instanceof Number) //was NumericValue
      // NumericValue types are ordered INT..DOUBLE starting at zero.  Selector types are
      // ordered INT..DOUBLE starting at Selector.INT.
      return EvaluatorImpl.getType((Number) value) + Selector.INT; // was ((NumericValue) value).type()
    else if (value instanceof Serializable)
      return OBJECT;
    else
      return INVALID;
  }
132525
def isNumber(self, value):
        
        try:
            str(value)
            float(value)
            return True

        except ValueError:
            return False
503643
public void addValue(int... value) {
        /* no-op if disabled */
        if (!enabled.get())
            return;

        for (int v : value) {
            try {
                getCurrentBucket().data.addValue(v);
            } catch (Exception e) {
                logger.error("Failed to add value: " + v, e);
            }
        }
    }
234711
function checkType($value)
    {
        if( $this->type !== null ) {
            // check type constraints
            if( $this->isTypeInteger() ) {
                if( ! is_numeric($value) )
                    throw new NonNumericException;
                $value = (int) $value;
            }
        }
        return $value;
    }
971952
public static Integer isInteger(String value) {
		Validate.notNull(value);
		Validate.notEmpty(value);
		Integer intValue = null;
		try{
			intValue = 	Integer.parseInt(value);
		} catch(NumberFormatException e){
			throw new TypeException("Integer");
		}
		return intValue;
	}
835401
public void setNumber(int index, Number value)
   {
      set(selectField(TaskFieldLists.CUSTOM_NUMBER, index), value);
   }
132892
def is_numeric(self, value, strict=False):
        """"""
        value = stringify(value)
        if value is not None:
            if value.isnumeric():
                return
        self.shout('value %r is not numeric', strict, value)
1058108
public static int getInt(JSONValue value) {
        if (value == null)
            return 0;
        if (!(value instanceof Number))
            throw new JSONException(NOT_A_NUMBER);
        return ((Number)value).intValue();
    }
126879
public void setInt(Integer value) {
		this.checkNull(value);
		list.add(value);
		type.add(Integer.class);
	}