org.jruby
Class RubyFloat

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

public class RubyFloat
extends RubyNumeric

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
RubyFloat(Ruby ruby)
           
RubyFloat(Ruby ruby, double value)
           
 
Method Summary
 RubyInteger ceil()
          num_ceil
 RubyArray coerce(RubyNumeric other)
          num_coerce
protected  int compareValue(RubyNumeric other)
           
static RubyClass createFloatClass(Ruby ruby)
           
 RubyBoolean finite_p()
           
 RubyInteger floor()
          num_floor
 double getDoubleValue()
           
 java.lang.Class getJavaClass()
          Method getJavaClass.
 long getLongValue()
           
 double getValue()
          Getter for property value.
 RubyFixnum hash()
           
static RubyFloat induced_from(IRubyObject recv, IRubyObject number)
           
 IRubyObject infinite_p()
           
 void marshalTo(MarshalStream output)
          Method marshalTo.
 RubyNumeric multiplyWith(RubyBignum other)
           
 RubyNumeric multiplyWith(RubyFloat other)
           
 RubyNumeric multiplyWith(RubyInteger other)
           
 RubyNumeric multiplyWith(RubyNumeric other)
           
 RubyBoolean nan_p()
           
static RubyFloat newFloat(Ruby ruby, double value)
           
 RubyNumeric op_div(RubyNumeric other)
           
 RubyNumeric op_minus(RubyNumeric other)
           
 RubyNumeric op_mod(RubyNumeric other)
           
 RubyNumeric op_mul(RubyNumeric num)
           
 RubyNumeric op_plus(RubyNumeric other)
           
 RubyNumeric op_pow(RubyNumeric other)
           
 RubyNumeric op_uminus()
          num_uminus
 RubyInteger round()
          num_round
 RubyFloat to_f()
           
 RubyInteger to_i()
           
 RubyString to_s()
           
 RubyInteger truncate()
          num_truncate
 RubyBoolean zero_p()
          num_zero_p
 
Methods inherited from class org.jruby.RubyNumeric
abs, cmp, createNumericClass, divmod, eql, equal, fix2int, fix2long, getCoerce, getTruncatedLongValue, int_p, modulo, multiplyWith, nonzero_p, num2long, numericValue, op_uplus, rbClone, remainder, str2fnum, str2inum, veryEqual
 
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, 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

RubyFloat

public RubyFloat(Ruby ruby)

RubyFloat

public RubyFloat(Ruby ruby,
                 double value)
Method Detail

getJavaClass

public java.lang.Class getJavaClass()
Description copied from interface: IRubyObject
Method getJavaClass.

Specified by:
getJavaClass in interface IRubyObject
Overrides:
getJavaClass in class RubyObject

getValue

public double getValue()
Getter for property value.

Returns:
Value of property value.

getDoubleValue

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

getLongValue

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

createFloatClass

public static RubyClass createFloatClass(Ruby ruby)

compareValue

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

hash

public RubyFixnum hash()
Overrides:
hash in class RubyObject

newFloat

public static RubyFloat newFloat(Ruby ruby,
                                 double value)

induced_from

public static RubyFloat induced_from(IRubyObject recv,
                                     IRubyObject number)

coerce

public RubyArray coerce(RubyNumeric other)
Description copied from class: RubyNumeric
num_coerce

Overrides:
coerce in class RubyNumeric

ceil

public RubyInteger ceil()
Description copied from class: RubyNumeric
num_ceil

Overrides:
ceil in class RubyNumeric

floor

public RubyInteger floor()
Description copied from class: RubyNumeric
num_floor

Overrides:
floor in class RubyNumeric

round

public RubyInteger round()
Description copied from class: RubyNumeric
num_round

Overrides:
round in class RubyNumeric

truncate

public RubyInteger truncate()
Description copied from class: RubyNumeric
num_truncate

Overrides:
truncate in class RubyNumeric

op_uminus

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

Overrides:
op_uminus 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 num)

multiplyWith

public RubyNumeric multiplyWith(RubyNumeric other)

multiplyWith

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

multiplyWith

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

multiplyWith

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

op_div

public RubyNumeric op_div(RubyNumeric other)

op_mod

public RubyNumeric op_mod(RubyNumeric other)

op_pow

public RubyNumeric op_pow(RubyNumeric other)

to_s

public RubyString to_s()
Overrides:
to_s in class RubyObject

to_f

public RubyFloat to_f()

to_i

public RubyInteger to_i()

infinite_p

public IRubyObject infinite_p()

finite_p

public RubyBoolean finite_p()

nan_p

public RubyBoolean nan_p()

zero_p

public RubyBoolean zero_p()
Description copied from class: RubyNumeric
num_zero_p

Overrides:
zero_p in class RubyNumeric

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


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.