Package org.jruby
Class RubyComparable
java.lang.Object
org.jruby.RubyComparable
Implementation of the Comparable module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RubyBooleanbetween_p(ThreadContext context, IRubyObject recv, IRubyObject first, IRubyObject second) cmp_betweenstatic IRubyObjectclamp(ThreadContext context, IRubyObject recv, IRubyObject arg) 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) Deprecated.static IRubyObjectcmperr(ThreadContext context, 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(ThreadContext context) static IRubyObjectinvcmp(ThreadContext context, IRubyObject recv, IRubyObject other) rb_invcmpstatic IRubyObjectinvcmp(ThreadContext context, ThreadContext.RecursiveFunctionEx<IRubyObject> func, IRubyObject recv, IRubyObject other) rb_invcmpstatic IRubyObjectop_equal(ThreadContext context, IRubyObject recv, IRubyObject other) cmp_equal (cmp_eq inlined here)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)
-
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
Deprecated. -
cmperr
rb_cmperr -
invcmp
rb_invcmp -
invcmp
public static IRubyObject invcmp(ThreadContext context, ThreadContext.RecursiveFunctionEx<IRubyObject> func, IRubyObject recv, IRubyObject other) rb_invcmp -
op_equal
cmp_equal (cmp_eq inlined here) -
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
-
clamp
public static IRubyObject clamp(ThreadContext context, IRubyObject recv, IRubyObject min, IRubyObject max)
-