org.jruby
Class RubyInteger

java.lang.Object
  extended byorg.jruby.RubyObject
      extended byorg.jruby.RubyNumeric
          extended byorg.jruby.RubyInteger
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject
Direct Known Subclasses:
RubyBignum, RubyFixnum

public abstract class RubyInteger
extends RubyNumeric

Implementation of the Integer class.

Author:
jpetersen

Nested Class Summary
 
Nested classes inherited from class org.jruby.RubyNumeric
RubyNumeric.InvalidIntegerException, RubyNumeric.NumberTooLargeException
 
Nested classes inherited from class org.jruby.RubyObject
RubyObject.Finalizer
 
Field Summary
 
Fields inherited from class org.jruby.RubyNumeric
DBL_EPSILON, NUMERIC_ALLOCATOR
 
Fields inherited from class org.jruby.RubyObject
instanceVariables, isTrue, metaClass, NEVER, OBJECT_ALLOCATOR
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyInteger(Ruby runtime, RubyClass rubyClass)
           
 
Method Summary
 RubyString chr()
          int_chr
 RubyInteger convertToInteger()
           
static RubyClass createIntegerClass(Ruby runtime)
           
 IRubyObject downto(IRubyObject to, Block block)
          int_downto
static IRubyObject induced_from(IRubyObject recv, IRubyObject other)
          rb_int_induced_from
 IRubyObject int_p()
          int_int_p
 IRubyObject succ()
          int_succ
 IRubyObject times(Block block)
           
 RubyInteger to_i()
          int_to_i
protected  RubyFloat toFloat()
           
 IRubyObject upto(IRubyObject to, Block block)
          int_upto
 
Methods inherited from class org.jruby.RubyNumeric
abs, asNumeric, callCoerced, callCoerced, ceil, checkInt, cmp, coerce, coerceBin, coerceBody, coerceCmp, coerceRelOp, createNumericClass, dbl_cmp, dbl2num, div, divmod, doCoerce, eql_p, equal, fix2int, fix2long, floor, getCoerced, getDoubleValue, getLongValue, init_copy, int2fix, modulo, newNumeric, nonzero_p, num2dbl, num2fix, num2int, num2long, quo, remainder, round, sadded, step, str2fnum, str2fnum, str2inum, str2inum, to_int, truncate, uminus, uplus, zero_p
 
Methods inherited from class org.jruby.RubyObject
addFinalizer, anyToString, asString, asSymbol, attachToObjectSpace, callInit, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodMissingIfNecessary, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, doClone, dup, eql, eqlInternal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getNativeTypeIndex, getRuntime, getSingletonClass, getSingletonClassClone, getType, hash, hashCode, id_deprecated, id, infectBy, inherited, initCopy, initialize_copy, initialize, inspect, instance_eval, instance_exec, instance_of, instance_variable_get, instance_variable_set, instance_variables, instanceVariableNames, isFalse, isFrozen, isImmediate, isKindOf, isNil, isSingleton, isTaint, isTrue, kind_of, makeMetaClass, match, method, methods, nil_p, obj_equal, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, removeFinalizers, removeInstanceVariable, respond_to, respondsTo, safeGetInstanceVariables, safeHasInstanceVariables, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, singleton_methods, specificEval, taint, tainted, testFrozen, to_s, toString, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RubyInteger

public RubyInteger(Ruby runtime,
                   RubyClass rubyClass)
Method Detail

createIntegerClass

public static RubyClass createIntegerClass(Ruby runtime)

convertToInteger

public RubyInteger convertToInteger()
Specified by:
convertToInteger in interface IRubyObject
Overrides:
convertToInteger in class RubyObject

toFloat

protected RubyFloat toFloat()

int_p

public IRubyObject int_p()
int_int_p

Overrides:
int_p in class RubyNumeric

upto

public IRubyObject upto(IRubyObject to,
                        Block block)
int_upto


downto

public IRubyObject downto(IRubyObject to,
                          Block block)
int_downto


times

public IRubyObject times(Block block)

succ

public IRubyObject succ()
int_succ


chr

public RubyString chr()
int_chr


to_i

public RubyInteger to_i()
int_to_i


induced_from

public static IRubyObject induced_from(IRubyObject recv,
                                       IRubyObject other)
rb_int_induced_from



Copyright © 2002-2007 JRuby Team. All Rights Reserved.