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 |
asNumeric, callCoerced, callCoerced, checkInt, coerceBin, coerceBody, coerceCmp, coerceRelOp, createNumericClass, dbl_cmp, dbl2num, div, doCoerce, fix2int, fix2long, getCoerced, init_copy, int_p, int2fix, modulo, newNumeric, nonzero_p, num2dbl, num2fix, num2int, num2long, quo, remainder, sadded, step, str2fnum, str2fnum, str2inum, str2inum, to_int, uplus |
| 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, callMethodMissing, callMethodMissing, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, doClone, dup, eql, eqlInternal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getMetaClass, getRuntime, getSingletonClass, getSingletonClassClone, getType, 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, toString, trueFalseNil, trueFalseNil, type_deprecated, type, untaint |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
RubyFloat
public RubyFloat(Ruby runtime)
RubyFloat
public RubyFloat(Ruby runtime,
double value)
createFloatClass
public static RubyClass createFloatClass(Ruby runtime)
getNativeTypeIndex
public int getNativeTypeIndex()
- Description copied from class:
RubyObject
- This is overridden in the other concrete Java builtins to provide a fast way
to determine what type they are.
- Specified by:
getNativeTypeIndex in interface IRubyObject- Overrides:
getNativeTypeIndex in class RubyObject
- Returns:
- the ClassIndex of the native type this object was constructed from
getJavaClass
public java.lang.Class getJavaClass()
- Description copied from interface:
IRubyObject
- RubyMethod getJavaClass.
- Specified by:
getJavaClass in interface IRubyObject- Overrides:
getJavaClass in class RubyObject
- Returns:
- Class
getValue
public double getValue()
- Getter for property value.
- Returns:
- Value of property value.
getDoubleValue
public double getDoubleValue()
- Overrides:
getDoubleValue in class RubyNumeric
getLongValue
public long getLongValue()
- Overrides:
getLongValue in class RubyNumeric
convertToFloat
public RubyFloat convertToFloat()
- Specified by:
convertToFloat in interface IRubyObject- Overrides:
convertToFloat in class RubyObject
- Returns:
compareValue
protected int compareValue(RubyNumeric other)
newFloat
public static RubyFloat newFloat(Ruby runtime,
double value)
induced_from
public static IRubyObject induced_from(IRubyObject recv,
IRubyObject number)
- rb_flo_induced_from
to_s
public IRubyObject to_s()
- flo_to_s
- Overrides:
to_s in class RubyObject
coerce
public IRubyObject coerce(IRubyObject other)
- flo_coerce
- Overrides:
coerce in class RubyNumeric
uminus
public IRubyObject uminus()
- flo_uminus
- Overrides:
uminus in class RubyNumeric
plus
public IRubyObject plus(IRubyObject other)
- flo_plus
minus
public IRubyObject minus(IRubyObject other)
- flo_minus
mul
public IRubyObject mul(IRubyObject other)
- flo_mul
fdiv
public IRubyObject fdiv(IRubyObject other)
- flo_div
mod
public IRubyObject mod(IRubyObject other)
- flo_mod
divmod
public IRubyObject divmod(IRubyObject other)
- flo_divmod
- Overrides:
divmod in class RubyNumeric
pow
public IRubyObject pow(IRubyObject other)
- flo_pow
equal
public IRubyObject equal(IRubyObject other)
- flo_eq
- Specified by:
equal in interface IRubyObject- Overrides:
equal in class RubyNumeric
cmp
public IRubyObject cmp(IRubyObject other)
- flo_cmp
- Overrides:
cmp in class RubyNumeric
gt
public IRubyObject gt(IRubyObject other)
- flo_gt
ge
public IRubyObject ge(IRubyObject other)
- flo_ge
lt
public IRubyObject lt(IRubyObject other)
- flo_lt
le
public IRubyObject le(IRubyObject other)
- flo_le
eql_p
public IRubyObject eql_p(IRubyObject other)
- flo_eql
- Overrides:
eql_p in class RubyNumeric
hash
public RubyFixnum hash()
- flo_hash
- Overrides:
hash in class RubyObject
hashCode
public final int hashCode()
- Overrides:
hashCode in class RubyObject
to_f
public IRubyObject to_f()
- flo_fo
abs
public IRubyObject abs()
- flo_abs
- Overrides:
abs in class RubyNumeric
zero_p
public IRubyObject zero_p()
- flo_zero_p
- Overrides:
zero_p in class RubyNumeric
truncate
public IRubyObject truncate()
- flo_truncate
- Overrides:
truncate in class RubyNumeric
floor
public IRubyObject floor()
- loor
- Overrides:
floor in class RubyNumeric
ceil
public IRubyObject ceil()
- flo_ceil
- Overrides:
ceil in class RubyNumeric
round
public IRubyObject round()
- flo_round
- Overrides:
round in class RubyNumeric
nan_p
public IRubyObject nan_p()
- flo_is_nan_p
infinite_p
public IRubyObject infinite_p()
- flo_is_infinite_p
finite_p
public IRubyObject finite_p()
- flo_is_finite_p
marshalTo
public static void marshalTo(RubyFloat aFloat,
MarshalStream output)
throws java.io.IOException
- Throws:
java.io.IOException
unmarshalFrom
public static RubyFloat unmarshalFrom(UnmarshalStream input)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2002-2007 JRuby Team. All Rights Reserved.