org.jruby
Class RubyFloat
java.lang.Object
org.jruby.RubyObject
org.jruby.RubyNumeric
org.jruby.RubyFloat
- All Implemented Interfaces:
- java.lang.Cloneable, IRubyObject
- public class RubyFloat
- extends RubyNumeric
- Author:
- jpetersen
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 |
RubyFloat
public RubyFloat(Ruby ruby)
RubyFloat
public RubyFloat(Ruby ruby,
double value)
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.