org.jruby
Class RubyBignum

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

public class RubyBignum
extends RubyInteger

Version:
$Revision: 1.8 $
Author:
jpetersen

Field Summary
 
Fields inherited from class org.jruby.RubyObject
runtime
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyBignum(Ruby ruby, java.math.BigInteger value)
           
 
Method Summary
 RubyFixnum aref(RubyNumeric pos)
           
static java.math.BigInteger bigIntValue(RubyNumeric other)
           
protected  int compareValue(RubyNumeric other)
           
static RubyClass createBignumClass(Ruby ruby)
           
 RubyNumeric[] getCoerce(RubyNumeric other)
          !!!
 double getDoubleValue()
           
 long getLongValue()
           
 long getTruncatedLongValue()
           
 java.math.BigInteger getValue()
          Getter for property value.
 RubyFixnum hash()
           
 void marshalTo(MarshalStream output)
          Method marshalTo.
 RubyNumeric multiplyWith(RubyFloat other)
           
 RubyNumeric multiplyWith(RubyInteger other)
           
 RubyBignum newBignum(java.math.BigInteger value)
           
static RubyBignum newBignum(Ruby ruby, java.math.BigInteger value)
           
static RubyBignum newBignum(Ruby ruby, double value)
           
static RubyBignum newBignum(Ruby ruby, long value)
           
 RubyNumeric op_and(RubyNumeric other)
           
 RubyNumeric op_div(RubyNumeric other)
           
 RubyNumeric op_invert()
           
 RubyBignum op_lshift(RubyNumeric other)
           
 RubyNumeric op_minus(RubyNumeric other)
           
 RubyNumeric op_mod(RubyNumeric other)
           
 RubyNumeric op_mul(RubyNumeric other)
           
 RubyInteger op_or(RubyNumeric other)
           
 RubyNumeric op_plus(RubyNumeric other)
           
 RubyNumeric op_pow(RubyNumeric other)
           
 RubyBignum op_rshift(RubyNumeric other)
           
 RubyNumeric op_uminus()
          num_uminus
 RubyInteger op_xor(RubyNumeric other)
           
 RubyNumeric remainder(RubyNumeric other)
          num_remainder
 RubyFixnum size()
           
 RubyFloat to_f()
           
 RubyString to_s()
           
static RubyBignum unmarshalFrom(UnmarshalStream input)
           
 
Methods inherited from class org.jruby.RubyInteger
chr, createIntegerClass, downto, induced_from, int_p, multiplyWith, next, step, times, to_i, toFloat, upto
 
Methods inherited from class org.jruby.RubyNumeric
abs, ceil, cmp, coerce, createNumericClass, divmod, eql, equal, fix2int, fix2long, floor, modulo, multiplyWith, nonzero_p, num2long, numericValue, op_uplus, rbClone, round, str2fnum, str2inum, truncate, veryEqual, zero_p
 
Methods inherited from class org.jruby.RubyObject
argCount, asSymbol, callbackFactory, callInit, callMethod, callMethod, callMethod, checkSafeString, convertToString, convertToType, convertType, createObjectClass, defineSingletonMethod, display, dup, equals, eval, eval, evalUnder, extend, extendObject, freeze, frozen, getInstanceVariable, getInstanceVariables, getJavaClass, getMetaClass, getRuntime, getSingletonClass, getType, hashCode, hasInstanceVariable, id, infectBy, inspect, instance_eval, instance_of, instance_variables, instanceVariableNames, isFalse, isFrozen, isKindOf, isNil, isTaint, isTrue, kind_of, makeMetaClass, method_missing, method, methods, nilObject, private_methods, protected_methods, removeInstanceVariable, respond_to, respondsTo, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, setupClone, singleton_methods, singletonMethodsAllowed, specificEval, taint, tainted, to_a, toString, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RubyBignum

public RubyBignum(Ruby ruby,
                  java.math.BigInteger value)
Method Detail

getDoubleValue

public double getDoubleValue()
Specified by:
getDoubleValue in class RubyNumeric

getLongValue

public long getLongValue()
Specified by:
getLongValue in class RubyNumeric

getTruncatedLongValue

public long getTruncatedLongValue()
Overrides:
getTruncatedLongValue in class RubyNumeric

getValue

public java.math.BigInteger getValue()
Getter for property value.

Returns:
Value of property value.

createBignumClass

public static RubyClass createBignumClass(Ruby ruby)

bigIntValue

public static java.math.BigInteger bigIntValue(RubyNumeric other)

compareValue

protected int compareValue(RubyNumeric other)
Overrides:
compareValue in class RubyNumeric

hash

public RubyFixnum hash()
Overrides:
hash in class RubyObject

newBignum

public static RubyBignum newBignum(Ruby ruby,
                                   long value)

newBignum

public static RubyBignum newBignum(Ruby ruby,
                                   double value)

newBignum

public static RubyBignum newBignum(Ruby ruby,
                                   java.math.BigInteger value)

newBignum

public RubyBignum newBignum(java.math.BigInteger value)

op_mod

public RubyNumeric op_mod(RubyNumeric other)

op_and

public RubyNumeric op_and(RubyNumeric other)

op_uminus

public RubyNumeric op_uminus()
Description copied from class: RubyNumeric
num_uminus

Overrides:
op_uminus in class RubyNumeric

op_invert

public RubyNumeric op_invert()

remainder

public RubyNumeric remainder(RubyNumeric other)
Description copied from class: RubyNumeric
num_remainder

Overrides:
remainder in class RubyNumeric

op_plus

public RubyNumeric op_plus(RubyNumeric other)

op_minus

public RubyNumeric op_minus(RubyNumeric other)

op_mul

public RubyNumeric op_mul(RubyNumeric other)

multiplyWith

public RubyNumeric multiplyWith(RubyInteger other)
Specified by:
multiplyWith in class RubyNumeric

multiplyWith

public RubyNumeric multiplyWith(RubyFloat other)
Specified by:
multiplyWith in class RubyNumeric

op_div

public RubyNumeric op_div(RubyNumeric other)

op_pow

public RubyNumeric op_pow(RubyNumeric other)

op_or

public RubyInteger op_or(RubyNumeric other)

op_xor

public RubyInteger op_xor(RubyNumeric other)

aref

public RubyFixnum aref(RubyNumeric pos)

to_s

public RubyString to_s()
Overrides:
to_s in class RubyObject

to_f

public RubyFloat to_f()

getCoerce

public RubyNumeric[] getCoerce(RubyNumeric other)
Description copied from class: RubyNumeric
!!!

Overrides:
getCoerce in class RubyNumeric

op_lshift

public RubyBignum op_lshift(RubyNumeric other)

op_rshift

public RubyBignum op_rshift(RubyNumeric other)

size

public RubyFixnum size()

marshalTo

public void marshalTo(MarshalStream output)
               throws java.io.IOException
Description copied from interface: IRubyObject
Method marshalTo.

Specified by:
marshalTo in interface IRubyObject
Overrides:
marshalTo in class RubyObject
Throws:
java.io.IOException

unmarshalFrom

public static RubyBignum unmarshalFrom(UnmarshalStream input)
                                throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.