|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.RubyObject
org.jruby.RubyNumeric
org.jruby.RubyFloat
public class RubyFloat
A representation of a float object
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jruby.RubyNumeric |
|---|
RubyNumeric.InvalidIntegerException, RubyNumeric.NumberTooLargeException |
| Nested classes/interfaces inherited from class org.jruby.RubyObject |
|---|
RubyObject.Finalizer, RubyObject.ObjectMethods, RubyObject.VariableTableEntry |
| Field Summary |
|---|
| Fields inherited from class org.jruby.RubyNumeric |
|---|
DBL_EPSILON, NUMERIC_ALLOCATOR |
| Fields inherited from class org.jruby.RubyObject |
|---|
ALL_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, OBJECT_ALLOCATOR, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, VARIABLE_TABLE_DEFAULT_CAPACITY, VARIABLE_TABLE_EMPTY_TABLE, VARIABLE_TABLE_LOAD_FACTOR, VARIABLE_TABLE_MAXIMUM_CAPACITY, variableTable, variableTableSize, variableTableThreshold |
| Fields inherited from interface org.jruby.runtime.builtin.IRubyObject |
|---|
NULL_ARRAY |
| Constructor Summary | |
|---|---|
RubyFloat(Ruby runtime)
|
|
RubyFloat(Ruby runtime,
double value)
|
|
| Method Summary | |
|---|---|
IRubyObject |
abs()
flo_abs |
IRubyObject |
ceil()
flo_ceil |
IRubyObject |
coerce(IRubyObject other)
flo_coerce |
protected int |
compareValue(RubyNumeric other)
|
RubyFloat |
convertToFloat()
Tries to convert this object to a Ruby Float using the "to_f" method. |
static RubyClass |
createFloatClass(Ruby runtime)
|
IRubyObject |
divmod(ThreadContext context,
IRubyObject other)
flo_divmod |
IRubyObject |
eql_p(IRubyObject other)
flo_eql |
IRubyObject |
finite_p()
flo_is_finite_p |
IRubyObject |
floor()
floor |
double |
getDoubleValue()
|
java.lang.Class<?> |
getJavaClass()
Will return the Java interface that most closely can represent this object, when working through JAva integration translations. |
long |
getLongValue()
|
int |
getNativeTypeIndex()
This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. |
double |
getValue()
Getter for property value. |
RubyFixnum |
hash()
flo_hash |
int |
hashCode()
Override the Object#hashCode method to make sure that the Ruby hash is actually used as the hashcode for Ruby objects. |
static IRubyObject |
induced_from(ThreadContext context,
IRubyObject recv,
IRubyObject number)
rb_flo_induced_from |
IRubyObject |
infinite_p()
flo_is_infinite_p |
static void |
marshalTo(RubyFloat aFloat,
MarshalStream output)
|
IRubyObject |
nan_p()
flo_is_nan_p |
static RubyFloat |
newFloat(Ruby runtime,
double value)
|
IRubyObject |
op_cmp(ThreadContext context,
IRubyObject other)
flo_cmp |
IRubyObject |
op_equal(ThreadContext context,
IRubyObject other)
flo_eq |
IRubyObject |
op_fdiv(ThreadContext context,
IRubyObject other)
flo_div |
IRubyObject |
op_ge(ThreadContext context,
IRubyObject other)
flo_ge |
IRubyObject |
op_gt(ThreadContext context,
IRubyObject other)
flo_gt |
IRubyObject |
op_le(ThreadContext context,
IRubyObject other)
flo_le |
IRubyObject |
op_lt(ThreadContext context,
IRubyObject other)
flo_lt |
IRubyObject |
op_minus(ThreadContext context,
IRubyObject other)
flo_minus |
IRubyObject |
op_mod(ThreadContext context,
IRubyObject other)
flo_mod |
IRubyObject |
op_mul(ThreadContext context,
IRubyObject other)
flo_mul |
IRubyObject |
op_plus(ThreadContext context,
IRubyObject other)
flo_plus |
IRubyObject |
op_pow(ThreadContext context,
IRubyObject other)
flo_pow |
IRubyObject |
op_uminus()
flo_uminus |
IRubyObject |
round()
flo_round |
IRubyObject |
to_f()
flo_fo |
IRubyObject |
to_s()
flo_to_s |
IRubyObject |
truncate()
flo_truncate |
static RubyFloat |
unmarshalFrom(UnmarshalStream input)
|
IRubyObject |
zero_p()
flo_zero_p |
| Methods inherited from class org.jruby.RubyNumeric |
|---|
abs, asNumeric, callCoerced, callCoerced, checkInt, coerceBin, coerceBody, coerceCmp, coerceRelOp, createNumericClass, dbl_cmp, dbl2num, div, doCoerce, eql_p, fix2int, fix2long, getCoerced, initialize_copy, int2fix, integer_p, modulo, newNumeric, nonzero_p, num2chr, num2dbl, num2fix, num2int, num2long, op_cmp, op_num_equal, op_uminus, op_uplus, quo, remainder, sadded, step, step, step, str2fnum, str2fnum, str2inum, str2inum, to_int, zero_p |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RubyFloat(Ruby runtime)
public RubyFloat(Ruby runtime,
double value)
| Method Detail |
|---|
public static RubyClass createFloatClass(Ruby runtime)
public int getNativeTypeIndex()
RubyObject
getNativeTypeIndex in interface CoreObjectTypegetNativeTypeIndex in class RubyObjectorg.jruby.runtime.ClassIndepublic java.lang.Class<?> getJavaClass()
RubyObject
getJavaClass in interface IRubyObjectgetJavaClass in class RubyObjectpublic double getValue()
public double getDoubleValue()
getDoubleValue in class RubyNumericpublic long getLongValue()
getLongValue in class RubyNumericpublic RubyFloat convertToFloat()
RubyObject
convertToFloat in interface IRubyObjectconvertToFloat in class RubyObjectprotected int compareValue(RubyNumeric other)
public static RubyFloat newFloat(Ruby runtime,
double value)
public static IRubyObject induced_from(ThreadContext context,
IRubyObject recv,
IRubyObject number)
public IRubyObject to_s()
to_s in class RubyObjectpublic IRubyObject coerce(IRubyObject other)
coerce in class RubyNumericpublic IRubyObject op_uminus()
public IRubyObject op_plus(ThreadContext context,
IRubyObject other)
public IRubyObject op_minus(ThreadContext context,
IRubyObject other)
public IRubyObject op_mul(ThreadContext context,
IRubyObject other)
public IRubyObject op_fdiv(ThreadContext context,
IRubyObject other)
public IRubyObject op_mod(ThreadContext context,
IRubyObject other)
public IRubyObject divmod(ThreadContext context,
IRubyObject other)
divmod in class RubyNumeric
public IRubyObject op_pow(ThreadContext context,
IRubyObject other)
public IRubyObject op_equal(ThreadContext context,
IRubyObject other)
op_equal in interface IRubyObjectop_equal in class RubyObject
public IRubyObject op_cmp(ThreadContext context,
IRubyObject other)
public IRubyObject op_gt(ThreadContext context,
IRubyObject other)
public IRubyObject op_ge(ThreadContext context,
IRubyObject other)
public IRubyObject op_lt(ThreadContext context,
IRubyObject other)
public IRubyObject op_le(ThreadContext context,
IRubyObject other)
public IRubyObject eql_p(IRubyObject other)
eql_p in class RubyObjectpublic RubyFixnum hash()
hash in class RubyObjectpublic final int hashCode()
RubyObject
hashCode in class RubyObjectpublic IRubyObject to_f()
public IRubyObject abs()
public IRubyObject zero_p()
public IRubyObject truncate()
truncate in class RubyNumericpublic IRubyObject floor()
floor in class RubyNumericpublic IRubyObject ceil()
ceil in class RubyNumericpublic IRubyObject round()
round in class RubyNumericpublic IRubyObject nan_p()
public IRubyObject infinite_p()
public IRubyObject finite_p()
public static void marshalTo(RubyFloat aFloat,
MarshalStream output)
throws java.io.IOException
java.io.IOException
public static RubyFloat unmarshalFrom(UnmarshalStream input)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||