public abstract class RubyInteger extends RubyNumeric
RubyNumeric.InvalidIntegerException, RubyNumeric.NumberTooLargeExceptionRubyObject.DataRubyBasicObject.Finalizer| Modifier and Type | Field and Description |
|---|---|
static ByteList[] |
SINGLE_CHAR_BYTELISTS19
Deprecated.
|
DBL_EPSILON, NUMERIC_ALLOCATORIVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampNULL_ARRAY| Constructor and Description |
|---|
RubyInteger(RubyClass rubyClass) |
RubyInteger(Ruby runtime,
RubyClass rubyClass) |
RubyInteger(Ruby runtime,
RubyClass rubyClass,
boolean useObjectSpace) |
RubyInteger(Ruby runtime,
RubyClass rubyClass,
boolean useObjectSpace,
boolean canBeTainted)
Deprecated.
|
abs2, arg, asNumeric, callCoerced, callCoerced, callCoerced, callCoerced, checkInt, checkInt, coerce, coerceBin, coerceBin, coerceBit, coerceBit, coerceBody, coerceCmp, coerceCmp, coerceFailed, coerceRelOp, coerceRelOp, coerceRescue, compareWithZero, conjugate, convertToRational, createNumericClass, dbl_cmp, dbl2ival, dbl2num, div, div19, divmod19, doCoerce, dup, eql_p, finite_p, fix2int, fix2int, fix2long, fixable, float2long, floatStepSize, getBigIntegerValue, getCoerced, getDoubleValue, getIntValue, getLongValue, getRoundingMode, idiv, image, infinite_p, initialize_copy, int2fix, intervalStepSize, isReal, isZero, modulo, modulo19, negativeInt, negFixable, negFixable, newNumeric, nonzero_p, num_imaginary, num2chr, num2dbl, num2dbl, num2fix, num2int, num2long, numFuncall, numFuncall, numRemainder, op_cmp, op_not, op_num_equal, op_uplus, polar, posFixable, posFixable, positiveInt, quo_19, quo, rbClone, rbClone, rbClone, rbClone, real_p, real, rect, scalar_p, singleton_method_added, step, str2fnum, str2fnum, str2fnum19, str2inum, str2inum, to_c, to_int, toJavaattachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, eqlInternal, equalInternal, equals, getNativeClassIndex, hashCode, inspect, op_eqq, puts, specificEval, toRubyString, toStringaddFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, ensureInstanceVariablesSettable, eql_p, eql, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize19, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method_missing, method_missing19, method, method19, methods, methods, methods19, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_equal_19, op_match, op_match19, op_not_equal, op_not_match, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_method, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderclone, finalize, getClass, notify, notifyAll, wait, wait, waitarray@Deprecated public static final ByteList[] SINGLE_CHAR_BYTELISTS19
public RubyInteger(RubyClass rubyClass)
public RubyInteger convertToInteger()
RubyBasicObjectconvertToInteger in interface IRubyObjectconvertToInteger in class RubyBasicObjectprotected RubyFloat toFloat()
public int signum()
public RubyInteger negate()
public IRubyObject isNegative(ThreadContext context)
RubyNumericisNegative in class RubyNumericpublic IRubyObject isPositive(ThreadContext context)
RubyNumericisPositive in class RubyNumericpublic boolean isNegative()
isNegative in class RubyNumericpublic boolean isPositive()
isPositive in class RubyNumericpublic static IRubyObject sqrt(ThreadContext context, IRubyObject self, IRubyObject num)
public abstract IRubyObject sqrt(ThreadContext context)
public static final long floorSqrt(long x)
public static final java.math.BigInteger floorSqrt(java.math.BigInteger x)
public IRubyObject integer_p()
integer_p in class RubyNumericpublic IRubyObject upto(ThreadContext context, IRubyObject to, Block block)
public IRubyObject downto(ThreadContext context, IRubyObject to, Block block)
public IRubyObject times(ThreadContext context, Block block)
protected RubyEnumerator.SizeFn timesSizeFn(Ruby runtime)
public IRubyObject succ(ThreadContext context)
public RubyString chr(ThreadContext context)
@Deprecated public final RubyString chr19(ThreadContext context)
public RubyString chr(ThreadContext context, IRubyObject arg)
@Deprecated public RubyString chr19(ThreadContext context, IRubyObject arg)
public IRubyObject ord(ThreadContext context)
public IRubyObject to_i()
public IRubyObject ceil(ThreadContext context)
RubyNumericceil in class RubyNumericpublic abstract IRubyObject ceil(ThreadContext context, IRubyObject arg)
public IRubyObject floor(ThreadContext context)
RubyNumericfloor in class RubyNumericpublic abstract IRubyObject floor(ThreadContext context, IRubyObject arg)
public IRubyObject truncate(ThreadContext context)
RubyNumerictruncate in class RubyNumericpublic abstract IRubyObject truncate(ThreadContext context, IRubyObject arg)
public IRubyObject round(ThreadContext context)
RubyNumericround in class RubyNumericpublic IRubyObject round(ThreadContext context, IRubyObject _digits)
public IRubyObject round(ThreadContext context, IRubyObject digits, IRubyObject _opts)
public IRubyObject round(ThreadContext context, int ndigits)
public RubyNumeric roundShared(ThreadContext context, int ndigits, java.math.RoundingMode roundingMode)
protected boolean int_round_zero_p(ThreadContext context, int ndigits)
protected static long int_round_half_even(long x,
long y)
protected static long int_round_half_up(long x,
long y)
protected static long int_round_half_down(long x,
long y)
protected static boolean int_half_p_half_even(ThreadContext context, RubyInteger num, RubyNumeric n, IRubyObject f)
protected static boolean int_half_p_half_up(ThreadContext context, RubyInteger num, RubyNumeric n, IRubyObject f)
protected static boolean int_half_p_half_down(ThreadContext context, RubyInteger num, RubyNumeric n, IRubyObject f)
public IRubyObject to_r(ThreadContext context)
public IRubyObject rationalize(ThreadContext context, IRubyObject[] args)
public RubyBoolean odd_p(ThreadContext context)
public RubyBoolean even_p(ThreadContext context)
public IRubyObject allbits_p(ThreadContext context, IRubyObject other)
public IRubyObject anybits_p(ThreadContext context, IRubyObject other)
public IRubyObject nobits_p(ThreadContext context, IRubyObject other)
public IRubyObject pred(ThreadContext context)
public IRubyObject gcd(ThreadContext context, IRubyObject other)
public IRubyObject fdiv(ThreadContext context, IRubyObject y)
RubyNumericfdiv in class RubyNumericpublic abstract IRubyObject fdivDouble(ThreadContext context, IRubyObject y)
public IRubyObject lcm(ThreadContext context, IRubyObject other)
public IRubyObject gcdlcm(ThreadContext context, IRubyObject other)
public RubyArray digits(ThreadContext context)
public abstract RubyArray digits(ThreadContext context, IRubyObject base)
public IRubyObject numerator(ThreadContext context)
RubyNumericnumerator in class RubyNumericpublic IRubyObject denominator(ThreadContext context)
RubyNumericdenominator in class RubyNumericpublic abstract RubyString to_s()
RubyBasicObjectto_s prints the object's class and an encoding of the
object id. As a special case, the top-level object that is the
initial execution context of Ruby programs returns ``main.''to_s in class RubyBasicObjectpublic abstract RubyString to_s(IRubyObject x)
public abstract IRubyObject op_uminus(ThreadContext context)
RubyNumericop_uminus in class RubyNumericpublic abstract IRubyObject op_plus(ThreadContext context, IRubyObject other)
op_plus in class RubyNumericpublic IRubyObject op_plus(ThreadContext context, long other)
public abstract IRubyObject op_minus(ThreadContext context, IRubyObject other)
public IRubyObject op_minus(ThreadContext context, long other)
public abstract IRubyObject op_mul(ThreadContext context, IRubyObject other)
public IRubyObject op_mul(ThreadContext context, long other)
public abstract IRubyObject idiv(ThreadContext context, IRubyObject other)
RubyNumericidiv in class RubyNumericpublic final IRubyObject div_div(ThreadContext context, IRubyObject other)
public abstract IRubyObject op_div(ThreadContext context, IRubyObject other)
public abstract IRubyObject op_mod(ThreadContext context, IRubyObject other)
public IRubyObject op_mod(ThreadContext context, long other)
public abstract IRubyObject op_pow(ThreadContext context, IRubyObject other)
public IRubyObject pow(ThreadContext context, IRubyObject other)
public IRubyObject pow(ThreadContext context, IRubyObject b, IRubyObject m)
protected IRubyObject intPowTmp3(ThreadContext context, RubyInteger y, RubyBignum m, boolean negaFlg)
public abstract IRubyObject abs(ThreadContext context)
RubyNumericabs in class RubyNumericpublic IRubyObject magnitude(ThreadContext context)
RubyNumericmagnitude in class RubyNumericpublic abstract IRubyObject op_equal(ThreadContext context, IRubyObject other)
RubyBasicObjectop_equal in interface IRubyObjectop_equal in class RubyBasicObjectpublic abstract IRubyObject op_cmp(ThreadContext context, IRubyObject other)
op_cmp in class RubyBasicObjectpublic abstract IRubyObject op_neg(ThreadContext context)
public abstract IRubyObject op_and(ThreadContext context, IRubyObject other)
public abstract IRubyObject op_or(ThreadContext context, IRubyObject other)
public abstract IRubyObject op_xor(ThreadContext context, IRubyObject other)
public abstract IRubyObject op_aref(ThreadContext context, IRubyObject other)
public abstract IRubyObject op_lshift(ThreadContext context, IRubyObject other)
public RubyInteger op_lshift(ThreadContext context, long other)
public abstract IRubyObject op_rshift(ThreadContext context, IRubyObject other)
public RubyInteger op_rshift(ThreadContext context, long other)
public abstract IRubyObject to_f(ThreadContext context)
public abstract IRubyObject size(ThreadContext context)
public abstract IRubyObject zero_p(ThreadContext context)
RubyNumericzero_p in class RubyNumericpublic abstract IRubyObject bit_length(ThreadContext context)
public IRubyObject op_gt(ThreadContext context, IRubyObject other)
public IRubyObject op_lt(ThreadContext context, IRubyObject other)
public IRubyObject op_ge(ThreadContext context, IRubyObject other)
public IRubyObject op_le(ThreadContext context, IRubyObject other)
public IRubyObject remainder(ThreadContext context, IRubyObject dividend)
RubyNumericremainder in class RubyNumericpublic IRubyObject divmod(ThreadContext context, IRubyObject other)
RubyNumericdivmod in class RubyNumericpublic IRubyObject op_uminus()
public IRubyObject op_neg()
public IRubyObject op_aref(IRubyObject other)
@Deprecated public IRubyObject op_lshift(IRubyObject other)
@Deprecated public IRubyObject op_rshift(IRubyObject other)
public IRubyObject to_f()
public IRubyObject size()
@Deprecated public static IRubyObject induced_from(ThreadContext context, IRubyObject recv, IRubyObject other)
@Deprecated public IRubyObject round()
round in class RubyNumeric@Deprecated public IRubyObject ceil()
ceil in class RubyNumeric@Deprecated public IRubyObject floor()
floor in class RubyNumeric@Deprecated public IRubyObject truncate()
RubyNumerictruncate in class RubyNumeric@Deprecated public final IRubyObject round19()
@Deprecated public final IRubyObject round19(ThreadContext context, IRubyObject arg)
@Deprecated public final IRubyObject op_idiv(ThreadContext context, IRubyObject arg)
Copyright © 2001-2019 JRuby. All Rights Reserved.