Package org.jruby
Class RubyFixnum
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyNumeric
org.jruby.RubyInteger
org.jruby.RubyFixnum
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,Appendable,Constantizable,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
Implementation of the Integer (Fixnum internal) class.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyNumeric
RubyNumeric.InvalidIntegerException, RubyNumeric.NumberTooLargeExceptionNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final longstatic final longstatic final longstatic final longstatic final longstatic final booleanFields inherited from class org.jruby.RubyInteger
NUMERR_NEGATIVE, NUMERR_TOOLARGE, NUMERR_TYPEFields inherited from class org.jruby.RubyNumeric
DBL_EPSILONFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_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, 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, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabs(ThreadContext context) fix_absvoidappendIntoString(RubyString target) asBigInteger(ThreadContext context) Return a BigInteger representation of this numerical valuedoubleasDouble(ThreadContext context) Return a double representation of this numerical valueintasInt(ThreadContext context) Returns the value of this numeric and a java int.rb_to_id Will try to convert this object to a String using the Ruby "to_str" if the object isn't already a String.longasLong(ThreadContext context) Return the value of this numeric as a 64-bit long.bit_length(ThreadContext context) ceil(ThreadContext context, IRubyObject arg) rb_fix_ceilfinal intcompareTo(IRubyObject other) Compares this Ruby object with another.constant()convertToInteger(String method) Tries to convert this object to a Ruby Integer using the supplied conversion method.convertToRational(ThreadContext context) static RubyClasscreateFixnumClass(ThreadContext context, RubyClass fixnum) denominator(ThreadContext context) numeric_denominatordigits(ThreadContext context, IRubyObject baseArg) rb_fix_digitsdivmod(ThreadContext context, IRubyObject other) fix_divmodfinal booleaneql(IRubyObject other) short circuit for Fixnum key comparisonequal_p(ThreadContext context, IRubyObject obj) rb_obj_equal Will use Java identity equality.booleanThis override does not do a "checked" dispatch.even_p(ThreadContext context) final booleanfastEqual(RubyFixnum other) fdivDouble(ThreadContext context, IRubyObject y) static RubyFixnumfloor(ThreadContext context, IRubyObject arg) rb_fix_floorstatic RubyFixnumdoubleDeprecated.Class<?> Will return the Java interface that most closely can represent this object, when working through Java integration translations.longDeprecated.This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.longgetValue()When you know you are working directly with a Fixnum you can get the long value it represents without usingRubyNumeric.asLong(ThreadContext).hash(ThreadContext context) Will return the hash code of this object.final inthashCode()This override does not do "checked" dispatch since Object usually has #hash defined.id()rb_obj_id Return the internal id of an object.idiv(ThreadContext context, long other) idiv(ThreadContext context, long y, String method) Deprecated.idiv(ThreadContext context, IRubyObject other) fix_div here is terrible MRI gotcha: 1.div 3.0$ -> 0 1 / 3.0 $ -> 0.3333333333333333 MRI is also able to do it in one place by looking at current frame in rb_num_coerce_bin: rb_funcall(x, ruby_frame->orig_func, 1, y); also note that RubyFloat doesn't override Numeric.dividiv(ThreadContext context, IRubyObject other, String method) Deprecated.idiv(ThreadContext context, IRubyObject other, CallSite site) static IRubyObjectinduced_from(IRubyObject recv, IRubyObject other) Deprecated.protected booleanint_round_zero_p(ThreadContext context, int ndigits) protected IRubyObjectintPowTmp1(ThreadContext context, RubyInteger y, long mm, boolean negaFlg) protected IRubyObjectintPowTmp2(ThreadContext context, IRubyObject y, long mm, boolean negaFlg) Deprecated.booleanIs object immediate (def: Fixnum, Symbol, true, false, nil?).isNegative(ThreadContext context) num_negative_pisPositive(ThreadContext context) num_positive_pfinal booleanisZero(ThreadContext context) magnitude(ThreadContext context) fix_abs/1.9static RubyFixnummodulo(ThreadContext context, IRubyObject other) num_modulonegate(ThreadContext context) final RubyFixnumnewFixnum(long newValue) Deprecated.static RubyFixnumstatic RubyFixnumnonzero_p(ThreadContext context) num_nonzero_pnumerator(ThreadContext context) numeric_numeratorodd_p(ThreadContext context) static RubyFixnumop_and(ThreadContext context, long other) op_and(ThreadContext context, IRubyObject other) fix_andprotected IRubyObjectop_aref_subclass(ThreadContext context, IRubyObject other) rb_fix_arefop_cmp(ThreadContext context, double other) op_cmp(ThreadContext context, long other) op_cmp(ThreadContext context, IRubyObject other) fix_cmpop_div(ThreadContext context, long other) op_div(ThreadContext context, IRubyObject other) op_equal(ThreadContext context, double other) op_equal(ThreadContext context, long other) op_equal(ThreadContext context, IRubyObject other) fix_equalbooleanop_equal_boolean(ThreadContext context, long other) op_ge(ThreadContext context, long other) op_ge(ThreadContext context, IRubyObject other) fix_gebooleanop_ge_boolean(ThreadContext context, long other) op_gt(ThreadContext context, long other) op_gt(ThreadContext context, IRubyObject other) fix_gtbooleanop_gt_boolean(ThreadContext context, long other) op_le(ThreadContext context, long other) op_le(ThreadContext context, IRubyObject other) fix_lebooleanop_le_boolean(ThreadContext context, long other) op_lshift(long width) Deprecated.op_lshift(ThreadContext context, long width) op_lshift(ThreadContext context, IRubyObject other) fix_lshiftop_lt(ThreadContext context, long other) op_lt(ThreadContext context, IRubyObject other) fix_ltbooleanop_lt_boolean(ThreadContext context, long other) op_minus(ThreadContext context, double other) op_minus(ThreadContext context, long other) op_minus(ThreadContext context, IRubyObject other) fix_minusop_minus_one(ThreadContext context) op_minus_two(ThreadContext context) op_mod(ThreadContext context, long other) op_mod(ThreadContext context, IRubyObject other) fix_modop_mul(ThreadContext context, double other) op_mul(ThreadContext context, long other) op_mul(ThreadContext context, IRubyObject other) fix_mulop_neg(ThreadContext context) fix_revop_not_equal(ThreadContext context, double other) op_not_equal(ThreadContext context, long other) op_not_equal(ThreadContext context, IRubyObject other) fix_not_equalop_or(ThreadContext context, long other) op_or(ThreadContext context, IRubyObject other) fix_orop_plus(ThreadContext context, double other) op_plus(ThreadContext context, long other) op_plus(ThreadContext context, IRubyObject other) fix_plusop_plus_one(ThreadContext context) op_plus_two(ThreadContext context) op_pow(ThreadContext context, long other) op_pow(ThreadContext context, IRubyObject other) fix_powop_rshift(long width) Deprecated.op_rshift(ThreadContext context, long width) op_rshift(ThreadContext context, IRubyObject other) fix_rshiftop_uminus(ThreadContext context) fix_uminusop_xor(ThreadContext context, long other) op_xor(ThreadContext context, IRubyObject other) fix_xorpred(ThreadContext context) remainder(ThreadContext context, IRubyObject y) num_remainderintsignum(ThreadContext context) singletonClass(ThreadContext context) Will either return the existing singleton class for this object, or create a new one and return that.size(ThreadContext context) fix_sizesqrt(ThreadContext context) succ(ThreadContext context) int_succtaint(ThreadContext context) Deprecated.static RubyFixnumtimes(ThreadContext context, Block block) to_f()Deprecated.to_f(ThreadContext context) fix_to_fto_s(IRubyObject[] args) Deprecated.to_s(ThreadContext context) to_s(ThreadContext context, IRubyObject arg0) to_sym()Deprecated.truncate(ThreadContext context, IRubyObject arg) rb_fix_truncatestatic RubyFixnumstatic RubyFixnumunmarshalFrom(UnmarshalStream input) Deprecated, for removal: This API element is subject to removal in a future version.static RubyFixnumunmarshalFrom(ThreadContext context, RubyInputStream in, MarshalLoader input) static RubyFixnumzero_p()Deprecated.zero_p(ThreadContext context) fix_zero_pMethods inherited from class org.jruby.RubyInteger
allbits_p, anybits_p, ceil, ceil, chr, chr, convertToInteger, createIntegerClass, digits, div_div, downto, fdiv, floor, floor, floorSqrt, floorSqrt, gcd, gcdlcm, induced_from, int_half_p_half_down, int_half_p_half_even, int_half_p_half_up, int_round_half_down, int_round_half_even, int_round_half_up, integer_p, integerCeil, integerFloor, intPowTmp3, isNegativeNumber, isPositiveNumber, lcm, negate, nobits_p, numToUint, numToUint, op_aref, op_aref, op_aref, op_idiv, op_lshift, op_neg, op_rshift, op_uminus, ord, pow, pow, rationalize, round, round, round, round, round, roundShared, signum, singleCharByteList, singleCharString, singleCharUTF8ByteList, size, sqrt, timesSize, to_i, to_i, to_r, to_s, to_s, toFloat, truncate, truncate, try_convert, uptoMethods inherited from class org.jruby.RubyNumeric
abs2, arg, asNumeric, callCoerced, callCoerced, callCoerced, callCoerced, checkInt, checkInt, coerce, coerce, coerceBin, coerceBin, coerceBit, coerceBit, coerceCmp, coerceCmp, coerceFailed, coerceRelOp, coerceRelOp, coerceRescue, compareWithZero, conjugate, convertToRational, createNumericClass, dbl_cmp, dbl2ival, dbl2num, div, doCoerce, dup, eql_p, finite_p, fix2int, fix2int, fix2long, fixable, float2long, float2ulong, floatStep, floatStepSize, getBigIntegerValue, getCoerced, getIntValue, getRoundingMode, image, infinite_p, initialize_copy, int2fix, integer_p, intervalStepSize, isNegative, isPositive, isReal, isZero, negativeInt, negFixable, negFixable, newNumeric, num_imaginary, num2chr, num2dbl, num2dbl, num2fix, num2fix, num2int, num2long, num2ulong, numFuncall, numFuncall, numRemainder, op_not, op_num_equal, op_uplus, op_uplus, polar, posFixable, posFixable, positiveInt, quo, rbClone, rbClone, rbClone, rbClone, real, real_p, rect, scalar_p, singleton_method_added, step, str2fnum, str2fnum, str2fnum, str2inum, str2inum, str2inum, to_c, to_int, toJavaMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, dig, dig1, dig2, eqlInternal, equalInternal, finishObjectClass, inspect, op_eqq, puts, specificEval, toRubyString, toStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, infectBy, initialize, initialize_copy, inspect, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_match, op_not_match, private_methods, protected_methods, public_methods, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariables
-
Field Details
-
SIGN_BIT
public static final long SIGN_BIT- See Also:
-
MAX
public static final long MAX- See Also:
-
MIN
public static final long MIN- See Also:
-
MAX_MARSHAL_FIXNUM
public static final long MAX_MARSHAL_FIXNUM- See Also:
-
MIN_MARSHAL_FIXNUM
public static final long MIN_MARSHAL_FIXNUM- See Also:
-
USE_CACHE
public static final boolean USE_CACHE -
CACHE_OFFSET
public static final int CACHE_OFFSET
-
-
Constructor Details
-
RubyFixnum
-
RubyFixnum
-
-
Method Details
-
createFixnumClass
-
getNativeClassIndex
Description copied from class:RubyObjectThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex- Specified by:
getNativeClassIndexin interfaceCoreObjectType- Overrides:
getNativeClassIndexin classRubyObject- Returns:
- the ClassIndex of the native type this object was constructed from
- See Also:
-
constant
- Specified by:
constantin interfaceConstantizable- See Also:
-
eql
short circuit for Fixnum key comparison- Specified by:
eqlin interfaceIRubyObject- Overrides:
eqlin classRubyBasicObject- Returns:
- Will by default just call the Ruby method "eql?"
-
equal_p
Description copied from class:RubyBasicObjectrb_obj_equal Will use Java identity equality.- Overrides:
equal_pin classRubyBasicObject- Parameters:
context- the thread contextobj- to compare with- Returns:
- are they equal?
-
isImmediate
public boolean isImmediate()Description copied from class:RubyBasicObjectIs object immediate (def: Fixnum, Symbol, true, false, nil?).- Specified by:
isImmediatein interfaceIRubyObject- Overrides:
isImmediatein classRubyBasicObject- Returns:
- boolean
-
singletonClass
Description copied from class:RubyBasicObjectWill either return the existing singleton class for this object, or create a new one and return that. For a few types a singleton class is not possible so it will throw an error.- Specified by:
singletonClassin interfaceIRubyObject- Overrides:
singletonClassin classRubyBasicObject- Parameters:
context- the current thread context- Returns:
- the singleton of this type
-
getJavaClass
Description copied from class:RubyBasicObjectWill return the Java interface that most closely can represent this object, when working through Java integration translations.- Specified by:
getJavaClassin interfaceIRubyObject- Overrides:
getJavaClassin classRubyBasicObject- Returns:
- the true Java class of this (Ruby) object
-
asBigInteger
Description copied from class:RubyNumericReturn a BigInteger representation of this numerical value- Overrides:
asBigIntegerin classRubyNumeric- Parameters:
context- the current thread context- Returns:
- a BigInteger
-
asDouble
Description copied from class:RubyNumericReturn a double representation of this numerical value- Overrides:
asDoublein classRubyNumeric- Parameters:
context- the current thread context- Returns:
- a double
-
asInt
Description copied from class:RubyNumericReturns the value of this numeric and a java int.- Overrides:
asIntin classRubyNumeric
-
asLong
Description copied from class:RubyNumericReturn the value of this numeric as a 64-bit long.- Overrides:
asLongin classRubyNumeric
-
getDoubleValue
Deprecated.- Overrides:
getDoubleValuein classRubyNumeric- Returns:
-
getLongValue
Deprecated.Description copied from class:RubyNumericReturn the value of this numeric as a 64-bit long. If the value does not fit in 64 bits, it will be truncated.- Overrides:
getLongValuein classRubyNumeric
-
getValue
public long getValue()When you know you are working directly with a Fixnum you can get the long value it represents without usingRubyNumeric.asLong(ThreadContext).- Returns:
- the long value
-
signum
- Overrides:
signumin classRubyInteger
-
negate
- Overrides:
negatein classRubyInteger
-
newFixnum
-
newFixnum
-
newFixnum
Deprecated. -
zero
-
one
-
two
-
three
-
four
-
five
-
minus_one
-
hash
Description copied from class:RubyBasicObjectWill return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.- Overrides:
hashin classRubyBasicObject- Parameters:
context- the current thread context- Returns:
- the hash value
-
hashCode
public final int hashCode()Description copied from class:RubyObjectThis override does not do "checked" dispatch since Object usually has #hash defined.- Overrides:
hashCodein classRubyObject- Returns:
- the hash code
- See Also:
-
times
- Overrides:
timesin classRubyInteger
-
ceil
rb_fix_ceil- Specified by:
ceilin classRubyInteger
-
floor
rb_fix_floor- Specified by:
floorin classRubyInteger
-
truncate
rb_fix_truncate- Specified by:
truncatein classRubyInteger
-
digits
rb_fix_digits- Specified by:
digitsin classRubyInteger
-
to_s
Deprecated.fix_to_s -
to_s
- Overrides:
to_sin classRubyInteger
-
to_s
- Overrides:
to_sin classRubyInteger
-
to_sym
Deprecated.fix_to_sym -
op_uminus
fix_uminus- Specified by:
op_uminusin classRubyInteger
-
op_plus
fix_plus- Specified by:
op_plusin classRubyInteger
-
op_plus
- Overrides:
op_plusin classRubyInteger
-
op_plus
-
op_plus_one
-
op_plus_two
-
op_minus
fix_minus- Specified by:
op_minusin classRubyInteger
-
op_minus
- Overrides:
op_minusin classRubyInteger
-
op_minus
-
op_minus_one
- Parameters:
context-- Returns:
- RubyInteger
-
op_minus_two
- Parameters:
context-- Returns:
- RubyInteger
-
op_mul
fix_mul- Specified by:
op_mulin classRubyInteger
-
op_mul
- Overrides:
op_mulin classRubyInteger
-
op_mul
-
idiv
fix_div here is terrible MRI gotcha: 1.div 3.0$ -> 0 1 / 3.0 $ -> 0.3333333333333333 MRI is also able to do it in one place by looking at current frame in rb_num_coerce_bin: rb_funcall(x, ruby_frame->orig_func, 1, y); also note that RubyFloat doesn't override Numeric.div- Specified by:
idivin classRubyInteger
-
idiv
- Overrides:
idivin classRubyNumeric
-
op_div
- Specified by:
op_divin classRubyInteger
-
op_div
-
odd_p
- Overrides:
odd_pin classRubyInteger
-
even_p
- Overrides:
even_pin classRubyInteger
-
pred
- Overrides:
predin classRubyInteger
-
idiv
Deprecated. -
idiv
-
idiv
Deprecated. -
op_mod
fix_mod- Specified by:
op_modin classRubyInteger
-
op_mod
- Overrides:
op_modin classRubyInteger
-
modulo
Description copied from class:RubyNumericnum_modulo- Overrides:
moduloin classRubyNumeric
-
divmod
fix_divmod- Overrides:
divmodin classRubyInteger
-
op_pow
fix_pow- Specified by:
op_powin classRubyInteger
-
op_pow
-
intPowTmp1
-
intPowTmp2
@Deprecated protected IRubyObject intPowTmp2(ThreadContext context, IRubyObject y, long mm, boolean negaFlg) Deprecated. -
abs
fix_abs- Specified by:
absin classRubyInteger
-
magnitude
fix_abs/1.9- Overrides:
magnitudein classRubyInteger
-
op_equal
fix_equal- Specified by:
op_equalin interfaceIRubyObject- Specified by:
op_equalin classRubyInteger
-
op_equal
-
op_equal
-
op_not_equal
fix_not_equal- Overrides:
op_not_equalin classRubyBasicObject- Parameters:
context- thread contextother- other object- Returns:
- false if this == other, true otherwise
-
op_not_equal
-
op_not_equal
-
op_equal_boolean
-
fastEqual
-
equals
Description copied from class:RubyObjectThis override does not do a "checked" dispatch.- Overrides:
equalsin classRubyObject- Parameters:
other- object to compare- Returns:
- true if equals
- See Also:
-
compareTo
Description copied from class:RubyBasicObjectCompares this Ruby object with another.- Specified by:
compareToin interfaceComparable<IRubyObject>- Overrides:
compareToin classRubyBasicObject- Parameters:
other- another IRubyObject- Returns:
- 0 if equal, < 0 if this is less than other, > 0 if this is greater than other
-
op_cmp
fix_cmp- Specified by:
op_cmpin classRubyInteger
-
op_cmp
-
op_cmp
-
op_gt
fix_gt- Overrides:
op_gtin classRubyInteger
-
op_gt
-
op_gt_boolean
-
op_ge
fix_ge- Overrides:
op_gein classRubyInteger
-
op_ge
-
op_ge_boolean
-
op_lt
fix_lt- Overrides:
op_ltin classRubyInteger
-
op_lt
-
op_lt_boolean
-
op_le
fix_le- Overrides:
op_lein classRubyInteger
-
op_le
-
op_le_boolean
-
op_neg
fix_rev- Specified by:
op_negin classRubyInteger
-
op_and
fix_and- Specified by:
op_andin classRubyInteger
-
op_and
-
op_or
fix_or- Specified by:
op_orin classRubyInteger
-
op_or
-
op_xor
fix_xor- Specified by:
op_xorin classRubyInteger
-
op_xor
-
op_aref_subclass
rb_fix_aref- Specified by:
op_aref_subclassin classRubyInteger
-
op_lshift
fix_lshift- Specified by:
op_lshiftin classRubyInteger
-
op_lshift
- Overrides:
op_lshiftin classRubyInteger
-
op_lshift
Deprecated. -
op_rshift
fix_rshift- Specified by:
op_rshiftin classRubyInteger
-
op_rshift
- Overrides:
op_rshiftin classRubyInteger
-
op_rshift
Deprecated. -
to_f
fix_to_f- Specified by:
to_fin classRubyInteger
-
to_f
Deprecated.- Overrides:
to_fin classRubyInteger
-
size
fix_size- Specified by:
sizein classRubyInteger
-
zero_p
Deprecated. -
zero_p
fix_zero_p- Specified by:
zero_pin classRubyInteger
-
isZero
- Overrides:
isZeroin classRubyNumeric
-
nonzero_p
Description copied from class:RubyNumericnum_nonzero_p- Overrides:
nonzero_pin classRubyNumeric
-
succ
Description copied from class:RubyIntegerint_succ- Overrides:
succin classRubyInteger
-
bit_length
- Specified by:
bit_lengthin classRubyInteger
-
id
Description copied from class:RubyBasicObjectrb_obj_id Return the internal id of an object.- Specified by:
idin interfaceIRubyObject- Overrides:
idin classRubyBasicObject- Returns:
- the object id
-
asJavaString
Description copied from class:RubyBasicObjectrb_to_id Will try to convert this object to a String using the Ruby "to_str" if the object isn't already a String. If this still doesn't work, will throw a Ruby TypeError.- Specified by:
asJavaStringin interfaceIRubyObject- Overrides:
asJavaStringin classRubyBasicObject- Returns:
- a (Java) string
-
unmarshalFrom
@Deprecated(since="10.0", forRemoval=true) public static RubyFixnum unmarshalFrom(UnmarshalStream input) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
unmarshalFrom
public static RubyFixnum unmarshalFrom(ThreadContext context, RubyInputStream in, MarshalLoader input) -
convertToInteger
Description copied from class:RubyBasicObjectTries to convert this object to a Ruby Integer using the supplied conversion method.- Specified by:
convertToIntegerin interfaceIRubyObject- Overrides:
convertToIntegerin classRubyBasicObject- Parameters:
method- conversion method to use e.g. "to_i"- Returns:
- an integer representation of this
-
fdivDouble
- Specified by:
fdivDoublein classRubyInteger
-
isNegative
Description copied from class:RubyNumericnum_negative_p- Overrides:
isNegativein classRubyInteger
-
isPositive
Description copied from class:RubyNumericnum_positive_p- Overrides:
isPositivein classRubyInteger
-
int_round_zero_p
- Overrides:
int_round_zero_pin classRubyInteger
-
numerator
Description copied from class:RubyNumericnumeric_numerator- Overrides:
numeratorin classRubyInteger
-
denominator
Description copied from class:RubyNumericnumeric_denominator- Overrides:
denominatorin classRubyInteger
-
convertToRational
- Overrides:
convertToRationalin classRubyNumeric
-
remainder
Description copied from class:RubyNumericnum_remainder- Overrides:
remainderin classRubyInteger
-
sqrt
- Specified by:
sqrtin classRubyInteger
-
appendIntoString
- Specified by:
appendIntoStringin interfaceAppendable
-
induced_from
Deprecated. -
taint
Deprecated.- Overrides:
taintin classRubyBasicObject
-