| Modifier and Type | Class and Description |
|---|---|
| public static class | RubyNumeric.
Deprecated
|
| public static class | RubyNumeric.
Deprecated
|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final double | |
| private static final String[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | RubyNumeric(Ruby runtime, RubyClass metaClass, boolean useObjectSpace, boolean canBeTainted)
Deprecated
|
| Modifier and Type | Method and Description |
|---|---|
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public BigInteger | Returns: a BigIntegerthe current thread context context)Return a BigInteger representation of this numerical value |
| public double | Returns: a doublethe current thread context context)Return a double representation of this numerical value |
| public int | |
| public long | |
| public RubyNumeric | |
| protected final IRubyObject | |
| public final IRubyObject | |
| protected final IRubyObject | |
| public final IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public static int | |
| public static void | |
| private static void | |
| public IRubyObject | coerce(IRubyObject other)
Deprecated
since 10.0. Use
org. instead.
|
| public IRubyObject | |
| protected final IRubyObject | coerceBin(ThreadContext context, String method, IRubyObject other)
Deprecated
rb_num_coerce_bin coercion taking two arguments |
| protected final IRubyObject | |
| protected final IRubyObject | coerceBit(ThreadContext context, String method, IRubyObject other)
rb_num_coerce_bit coercion taking two arguments |
| protected final IRubyObject | |
| private static IRubyObject | coerceBitRecursive(ThreadContext context, JavaSites.
|
| protected final IRubyObject | coerceCmp(ThreadContext context, String method, IRubyObject other)
Deprecated
rb_num_coerce_cmp coercion used for comparisons |
| protected final IRubyObject | |
| protected final void | |
| protected final IRubyObject | coerceRelOp(ThreadContext context, String method, IRubyObject other)
Deprecated
rb_num_coerce_relop coercion used for relative operators |
| protected final IRubyObject | |
| protected final IRubyObject | |
| private static RubyArray | |
| pack-priv static IRubyObject | |
| protected static IRubyObject | |
| public IRubyObject | |
| public RubyRational | |
| public RubyRational | |
| public static RubyClass | |
| public static RubyInteger | dbl2ival(Ruby runtime, double val)
Deprecated
since 10.0. Use
org. instead.
|
| public static IRubyObject | dbl2num(Ruby runtime, double val)
Deprecated
since 10.0. Use
org. instead.
|
| public static IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| protected final RubyArray | |
| private static void | duckStep(ThreadContext context, IRubyObject from, IRubyObject to, IRubyObject step, boolean inf, boolean desc, Block block)
|
| public IRubyObject | dup()
Overrides org. Implements org. RubyMethod dup. |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public static int | |
| public static int | |
| public static long | |
| public static boolean | |
| private static void | fixnumStep(ThreadContext context, RubyFixnum from, IRubyObject to, RubyFixnum step, boolean inf, boolean desc, Block block)
|
| public static long | |
| public static long | Returns: an unsigned long encoded as a signed long, or raise an error if out of rangethe argument to convert flt)Convert the given RubyFloat into an unsigned long, encoded as a signed long. |
| public static boolean | floatStep(ThreadContext context, IRubyObject from, IRubyObject to, IRubyObject step, boolean excl, boolean allowEndless, Block block)
|
| public static double | floatStepSize(double beg, double end, double unit, boolean excludeLast)
Returns the number of unit-sized steps between the given beg and end. |
| public IRubyObject | |
| public IRubyObject | |
| public BigInteger | |
| protected final IRubyObject[] | |
| public double | |
| public int | getIntValue()
Deprecated
since 10.0. Use
org. instead.
Return the value of this numeric as a 32-bit long. |
| public long | getLongValue()
Deprecated
since 10.0. Use
org. instead.
Return the value of this numeric as a 64-bit long. |
| public static RoundingMode | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | initialize_copy(ThreadContext
the thread context context, IRubyObject the original arg)Overrides org. num_init_copy |
| public static RubyNumeric | int2fix(Ruby runtime, long val)
Deprecated
since 10.0. Use
org. instead.
|
| public IRubyObject | |
| public IRubyObject | |
| public static RubyNumeric | intervalStepSize(ThreadContext context, IRubyObject from, IRubyObject to, IRubyObject step, boolean excl)
|
| public IRubyObject | |
| public boolean | isNegative()
Deprecated
since 10.0. Use
org. instead.
|
| public boolean | |
| public IRubyObject | |
| public boolean | isPositive()
Deprecated
since 10.0. Use
org. instead.
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public IRubyObject | |
| public IRubyObject | |
| pack-priv IRubyObject | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static RubyNumeric | |
| public IRubyObject | |
| public static byte | |
| public static double | num2dbl(IRubyObject arg)
Deprecated
since 10.0. Use
org. instead.
|
| public static double | num2dbl(ThreadContext context, IRubyObject arg)
Deprecated
since 10.0. Use
org. instead.
rb_num2dbl and NUM2DBL |
| public static IRubyObject | |
| public static IRubyObject | |
| public static int | num2int(IRubyObject arg)
Deprecated
since 10.0.
rb_num2int, NUM2INT
if you know it is Integer use |
| public static long | |
| public static long | Returns: an unsigned long encoded as a signed long, or raise an error if out of rangethe argument to convert arg)Convert the given value into an unsigned long, encoded as a signed long. |
| public IRubyObject | |
| public IRubyObject | |
| private int | numExtractStepArgs(ThreadContext context, IRubyObject[] args, IRubyObject[] newArgs)
MRI: num_step_extract_args |
| public static IRubyObject | |
| public static IRubyObject | |
| private static IRubyObject | |
| public IRubyObject | |
| private boolean | numStepCheckFixArgs(ThreadContext context, int argc, IRubyObject[] newArgs, IRubyObject by)
MRI: num_step_check_fix_args |
| private static boolean | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| protected final IRubyObject | op_num_equal(ThreadContext context, IRubyObject other)
num_equal, doesn't override RubyObject.op_equal |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| private static long | |
| public IRubyObject | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public IRubyObject | |
| public final IRubyObject | |
| public final IRubyObject | |
| public final IRubyObject | |
| public final IRubyObject | rbClone()
Overrides org. Implements org. RubyMethod clone. |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| public IRubyObject | |
| private boolean | scanStepArgs(ThreadContext context, IRubyObject[] args, IRubyObject[] newArgs)
MRI: num_step_scan_args |
| public static IRubyObject | |
| private static JavaSites. | sites(ThreadContext context)
Hides org. Retrieve the call sites for this class. |
| public IRubyObject | |
| private IRubyObject | |
| private static IRubyObject | stepSize(ThreadContext context, RubyNumeric from, IRubyObject[] args)
A step size method suitable for lambda method reference implementation of |
| public static RubyFloat | Returns: a RubyFloat representing the result of the conversion, which will be 0.0 if the conversion failed.the ruby runtime runtime, RubyString the string to be converted arg)Same as RubyNumeric.str2fnum passing false for strict. |
| public static IRubyObject | Returns: a RubyFloat representing the result of the conversion, which will be 0.0 if the conversion failed.the ruby runtime runtime, RubyString the string to be converted arg, boolean if true, enforce the strict criteria for String encoding of
numeric values, as required by Float('n'), and raise an
exception when those criteria are not met. Otherwise, allow
lax expression of values, as permitted by String#to_f, and
return a value in all cases.
strict, boolean exception)Todo describe the rules/criteria Converts a string representation of a floating-point number to the numeric value. |
| public static RubyFloat | |
| public static RubyInteger | |
| public static IRubyObject | Returns: a RubyFixnum or (if necessary) a RubyBignum representing the result of the conversion, which will be zero if the conversion failed.the ruby runtime runtime, RubyString the string to be converted str, int the expected base of the number (for example, 2, 8, 10, 16),
or 0 if the method should determine the base automatically
(defaults to 10). Values 0 and 2-36 are permitted. Any other
value will result in an ArgumentError. base, boolean if true, enforce the strict criteria for String encoding of
numeric values, as required by Integer('n'), and raise an
exception when those criteria are not met. Otherwise, allow
lax expression of values, as permitted by String#to_i, and
return a value in almost all cases (excepting illegal radix).
strict, boolean exception)Todo describe the rules/criteria Converts a string representation of an integer to the integer value. |
| public static RubyInteger | |
| public IRubyObject | |
| public IRubyObject | |
| public <T> T | toJava(Class<T>
The target type to which the object should be converted. target)Overrides org. Implements org. Convert the object to the specified Java class, if possible. |
| public IRubyObject | |
| public IRubyObject | |
| private IRubyObject | unwrapCoerced(ThreadContext context, String method, IRubyObject other, RubyArray<T extends IRubyObject> ary)
|
| private IRubyObject | unwrapCoerced(ThreadContext context, CallSite site, IRubyObject other, RubyArray<T extends IRubyObject> ary)
|
| public IRubyObject |