Save This Page
Home » jruby-src-1.1.3 » org.jruby » [javadoc | source]
org.jruby
public class: RubyFixnum [javadoc | source]
java.lang.Object
   org.jruby.RubyObject
      org.jruby.RubyNumeric
         org.jruby.RubyInteger
            org.jruby.RubyFixnum

All Implemented Interfaces:
    VALUE

Implementation of the Fixnum class.
Field Summary
public static final  long SIGN_BIT     
public static final  long MAX     
public static final  long MIN     
public static final  long MAX_MARSHAL_FIXNUM     
public static final  long MIN_MARSHAL_FIXNUM     
Fields inherited from org.jruby.RubyNumeric:
NUMERIC_ALLOCATOR,  DBL_EPSILON
Constructor:
 public RubyFixnum(Ruby runtime) 
 public RubyFixnum(Ruby runtime,
    long value) 
Method from org.jruby.RubyFixnum Summary:
abs,   as,   asJavaString,   createFixnumClass,   div_div,   divmod,   eql,   equals,   even_p,   five,   four,   freeze,   getDoubleValue,   getJavaClass,   getLongValue,   getNativeTypeIndex,   getSingletonClass,   hash,   hashCode,   id,   id2name,   idiv,   induced_from,   isImmediate,   minus_one,   newFixnum,   newFixnum,   odd_p,   one,   op_and,   op_aref,   op_cmp,   op_div,   op_equal,   op_ge,   op_gt,   op_le,   op_lshift,   op_lt,   op_minus,   op_mod,   op_mul,   op_neg,   op_or,   op_plus,   op_pow,   op_rshift,   op_uminus,   op_xor,   pred,   quo,   size,   taint,   three,   to_f,   to_java,   to_s,   to_s,   to_s,   to_sym,   two,   unmarshalFrom,   zero,   zero_p
Methods from org.jruby.RubyInteger:
chr,   convertToInteger,   createIntegerClass,   downto,   even_p,   induced_from,   integer_p,   odd_p,   pred,   succ,   times,   toFloat,   to_i,   upto
Methods from org.jruby.RubyNumeric:
abs,   asNumeric,   callCoerced,   callCoerced,   ceil,   checkInt,   coerce,   coerceBin,   coerceBody,   coerceCmp,   coerceRelOp,   createNumericClass,   dbl2num,   dbl_cmp,   div,   divmod,   doCoerce,   eql_p,   fix2int,   fix2long,   floor,   getCoerced,   getDoubleValue,   getLongValue,   initialize_copy,   int2fix,   integer_p,   modulo,   newNumeric,   nonzero_p,   num2chr,   num2dbl,   num2fix,   num2int,   num2long,   op_cmp,   op_num_equal,   op_uminus,   op_uplus,   quo,   remainder,   round,   sadded,   step,   step,   step,   str2fnum,   str2fnum,   str2inum,   str2inum,   to_int,   truncate,   zero_p
Methods from org.jruby.RubyObject:
callInit,   defineSingletonMethod,   funcall,   funcall,   funcall,   funcall3,   getClassVarSingleton,   getInstanceVar,   getInstanceVar,   getInstanceVariables,   getRuby,   getRubyClass,   getSingletonClass,   infectObject,   isFalse,   isFrozen,   isImmediate,   isInstanceVarDefined,   isNil,   isSpecialConst,   isTaint,   isTrue,   m_clone,   m_dup,   m_equal,   m_freeze,   m_frozen,   m_id,   m_inspect,   m_instance_of,   m_kind_of,   m_methods,   m_private_methods,   m_protected_methods,   m_singleton_methods,   m_taint,   m_tainted,   m_to_s,   m_type,   m_untaint,   setFrozen,   setImmediate,   setInstanceVar,   setInstanceVar,   setInstanceVariables,   setRuby,   setRubyClass,   setTaint,   setupClone,   setupObject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jruby.RubyFixnum Detail:
 public IRubyObject abs() 
    fix_abs
 public IRubyObject as(Class javaClass) 
 public String asJavaString() 
 public static RubyClass createFixnumClass(Ruby runtime) 
 public IRubyObject div_div(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.div
 public IRubyObject divmod(ThreadContext context,
    IRubyObject other) 
    fix_divmod
 public final boolean eql(IRubyObject other) 
    short circuit for Fixnum key comparison
 public boolean equals(Object other) 
 public RubyBoolean even_p() 
 public static RubyFixnum five(Ruby runtime) 
 public static RubyFixnum four(Ruby runtime) 
 public IRubyObject freeze(ThreadContext context) 
 public double getDoubleValue() 
 public Class getJavaClass() 
 public long getLongValue() 
 public int getNativeTypeIndex() 
 public RubyClass getSingletonClass() 
 public RubyFixnum hash() 
 public final int hashCode() 
 public IRubyObject id() 
 public IRubyObject id2name() 
    fix_id2name
 public IRubyObject idiv(ThreadContext context,
    IRubyObject other,
    String method) 
 public static IRubyObject induced_from(IRubyObject recv,
    IRubyObject other) 
    rb_fix_induced_from
 public boolean isImmediate() 
 public static RubyFixnum minus_one(Ruby runtime) 
 public RubyFixnum newFixnum(long newValue) 
 public static RubyFixnum newFixnum(Ruby runtime,
    long value) 
 public RubyBoolean odd_p() 
 public static RubyFixnum one(Ruby runtime) 
 public IRubyObject op_and(ThreadContext context,
    IRubyObject other) 
    fix_and
 public IRubyObject op_aref(IRubyObject other) 
    fix_aref
 public IRubyObject op_cmp(ThreadContext context,
    IRubyObject other) 
    fix_cmp
 public IRubyObject op_div(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_equal(ThreadContext context,
    IRubyObject other) 
    fix_equal
 public IRubyObject op_ge(ThreadContext context,
    IRubyObject other) 
    fix_ge
 public IRubyObject op_gt(ThreadContext context,
    IRubyObject other) 
    fix_gt
 public IRubyObject op_le(ThreadContext context,
    IRubyObject other) 
    fix_le
 public IRubyObject op_lshift(IRubyObject other) 
    fix_lshift
 public IRubyObject op_lt(ThreadContext context,
    IRubyObject other) 
    fix_lt
 public IRubyObject op_minus(ThreadContext context,
    IRubyObject other) 
    fix_minus
 public IRubyObject op_mod(ThreadContext context,
    IRubyObject other) 
    fix_mod
 public IRubyObject op_mul(ThreadContext context,
    IRubyObject other) 
    fix_mul
 public IRubyObject op_neg() 
    fix_rev
 public IRubyObject op_or(ThreadContext context,
    IRubyObject other) 
    fix_or
 public IRubyObject op_plus(ThreadContext context,
    IRubyObject other) 
    fix_plus
 public IRubyObject op_pow(ThreadContext context,
    IRubyObject other) 
    fix_pow
 public IRubyObject op_rshift(IRubyObject other) 
    fix_rshift
 public IRubyObject op_uminus() 
    fix_uminus
 public IRubyObject op_xor(ThreadContext context,
    IRubyObject other) 
    fix_xor
 public IRubyObject pred() 
 public IRubyObject quo(ThreadContext context,
    IRubyObject other) 
    fix_quo
 public IRubyObject size() 
    fix_size
 public IRubyObject taint(ThreadContext context) 
 public static RubyFixnum three(Ruby runtime) 
 public IRubyObject to_f() 
    fix_to_f
 public IRubyObject to_java() 
 public RubyString to_s() 
 public RubyString to_s(IRubyObject[] args) 
    fix_to_s
 public RubyString to_s(IRubyObject arg0) 
 public IRubyObject to_sym() 
    fix_to_sym
 public static RubyFixnum two(Ruby runtime) 
 public static RubyFixnum unmarshalFrom(UnmarshalStream input) throws IOException 
 public static RubyFixnum zero(Ruby runtime) 
 public IRubyObject zero_p() 
    fix_zero_p