Package org.jruby
Class RubyComparable
java.lang.Object
org.jruby.RubyComparable
Implementation of the Comparable module.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final RubyComparable.CmpRecursiveprivate static final ThreadContext.RecursiveFunctionEx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RubyBooleanbetween_p(ThreadContext context, IRubyObject recv, IRubyObject first, IRubyObject second) cmp_betweenprivate static IRubyObjectcallCmpMethod(ThreadContext context, IRubyObject recv, IRubyObject other, IRubyObject returnValueOnError) static IRubyObjectclamp(ThreadContext context, IRubyObject recv, IRubyObject min, IRubyObject max) static intcmpAndCmpint(ThreadContext context, IRubyObject a, IRubyObject b) static intcmpAndCmpint(ThreadContext context, CallSite op_cmp, CallSite op_gt, CallSite op_lt, IRubyObject a, IRubyObject b) static IRubyObjectcmperr(IRubyObject recv, IRubyObject other) rb_cmperrstatic intcmpint(ThreadContext context, IRubyObject val, IRubyObject a, IRubyObject b) static intcmpint(ThreadContext context, CallSite op_gt, CallSite op_lt, IRubyObject val, IRubyObject a, IRubyObject b) rb_cmpintstatic RubyModulecreateComparable(Ruby runtime) static IRubyObjectinvcmp(ThreadContext context, IRubyObject recv, IRubyObject other) rb_invcmpstatic IRubyObjectinvcmp(ThreadContext context, ThreadContext.RecursiveFunctionEx func, IRubyObject recv, IRubyObject other) rb_invcmpstatic IRubyObjectop_equal(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_equal (cmp_eq inlined here)static IRubyObjectop_equal19(ThreadContext context, IRubyObject recv, IRubyObject other) Deprecated.static RubyBooleanop_ge(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_gestatic RubyBooleanop_gt(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_gtstatic RubyBooleanop_le(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_lestatic RubyBooleanop_lt(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_ltstatic RubyBooleanop_lt(ThreadContext context, CallSite cmp, IRubyObject recv, IRubyObject other) private static JavaSites.ComparableSitessites(ThreadContext context)
-
Field Details
-
DEFAULT_INVCMP
-
CMP_RECURSIVE
-
-
Constructor Details
-
RubyComparable
public RubyComparable()
-
-
Method Details
-
createComparable
-
cmpint
public static int cmpint(ThreadContext context, CallSite op_gt, CallSite op_lt, IRubyObject val, IRubyObject a, IRubyObject b) rb_cmpint -
cmpint
-
cmpAndCmpint
-
cmpAndCmpint
public static int cmpAndCmpint(ThreadContext context, CallSite op_cmp, CallSite op_gt, CallSite op_lt, IRubyObject a, IRubyObject b) -
cmperr
rb_cmperr -
invcmp
rb_invcmp -
invcmp
public static IRubyObject invcmp(ThreadContext context, ThreadContext.RecursiveFunctionEx func, IRubyObject recv, IRubyObject other) rb_invcmp -
op_equal
cmp_equal (cmp_eq inlined here) -
op_equal19
@Deprecated public static IRubyObject op_equal19(ThreadContext context, IRubyObject recv, IRubyObject other) Deprecated. -
callCmpMethod
private static IRubyObject callCmpMethod(ThreadContext context, IRubyObject recv, IRubyObject other, IRubyObject returnValueOnError) -
op_gt
cmp_gt -
op_ge
cmp_ge -
op_lt
cmp_lt -
op_lt
public static RubyBoolean op_lt(ThreadContext context, CallSite cmp, IRubyObject recv, IRubyObject other) -
op_le
cmp_le -
between_p
public static RubyBoolean between_p(ThreadContext context, IRubyObject recv, IRubyObject first, IRubyObject second) cmp_between -
clamp
public static IRubyObject clamp(ThreadContext context, IRubyObject recv, IRubyObject min, IRubyObject max) -
sites
-