Codota Logo
RubyBignum.checkShiftDown
Code IndexAdd Codota to your IDE (free)

How to use
checkShiftDown
method
in
org.jruby.RubyBignum

Best Java code snippets using org.jruby.RubyBignum.checkShiftDown (Showing top 8 results out of 315)

  • Common ways to obtain RubyBignum
private void myMethod () {
RubyBignum r =
  • Codota IconRubyRandom.RandomType rubyRandomRandomType;rubyRandomRandomType.getState()
  • Codota IconRuby runtime;String value;new RubyBignum(runtime, new BigInteger(value))
  • Codota IconRuby runtime;RubyBignum.newBignum(runtime, value)
  • Smart code suggestions by Codota
}
origin: org.jruby/jruby-core

/** rb_big_lshift
 *
 */
@Override
public IRubyObject op_lshift(ThreadContext context, IRubyObject other) {
  long shift;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum) other).getLongValue();
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum) other;
      if (otherBignum.value.signum() < 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(context, this);
        if (tmp != null) return tmp;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return op_lshift(context, shift);
}
origin: org.jruby/jruby-core

/** rb_big_rshift
 *
 */
@Override
public IRubyObject op_rshift(ThreadContext context, IRubyObject other) {
  long shift;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum) other).getLongValue();
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum) other;
      if (otherBignum.value.signum() >= 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(context, this);
        if (tmp != null) return tmp;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return op_rshift(context, shift);
}
origin: org.jruby/jruby-complete

/** rb_big_rshift
 *
 */
@Override
public IRubyObject op_rshift(ThreadContext context, IRubyObject other) {
  long shift;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum) other).getLongValue();
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum) other;
      if (otherBignum.value.signum() >= 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(context, this);
        if (tmp != null) return tmp;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return op_rshift(context, shift);
}
origin: org.jruby/jruby-complete

/** rb_big_lshift
 *
 */
@Override
public IRubyObject op_lshift(ThreadContext context, IRubyObject other) {
  long shift;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum) other).getLongValue();
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum) other;
      if (otherBignum.value.signum() < 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(context, this);
        if (tmp != null) return tmp;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return op_lshift(context, shift);
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

/** rb_big_lshift
 *
 */
@JRubyMethod(name = "<<", required = 1)
public IRubyObject op_lshift(IRubyObject other) {
  long shift;
  boolean neg = false;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum)other).getLongValue();
      if (shift < 0) {
        neg = true;
        shift = -shift;
      }
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum)other;
      if (otherBignum.value.signum() < 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(this);
        if (!tmp.isNil()) return tmp;
        neg = true;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return bignorm(getRuntime(), neg ? value.shiftRight((int)shift) : value.shiftLeft((int)shift));
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/** rb_big_lshift
 *
 */
@JRubyMethod(name = "<<", required = 1)
public IRubyObject op_lshift(IRubyObject other) {
  long shift;
  boolean neg = false;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum)other).getLongValue();
      if (shift < 0) {
        neg = true;
        shift = -shift;
      }
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum)other;
      if (otherBignum.value.signum() < 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(this);
        if (!tmp.isNil()) return tmp;
        neg = true;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return bignorm(getRuntime(), neg ? value.shiftRight((int)shift) : value.shiftLeft((int)shift));
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

/** rb_big_rshift
 *
 */
@JRubyMethod(name = ">>", required = 1)
public IRubyObject op_rshift(IRubyObject other) {
  long shift;
  boolean neg = false;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum)other).getLongValue();
      if (shift < 0) {
        neg = true;
        shift = -shift;
      }
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum)other;
      if (otherBignum.value.signum() >= 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(this);
        if (!tmp.isNil()) return tmp;
      } else {
        neg = true;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return bignorm(getRuntime(), neg ? value.shiftLeft((int)shift) : value.shiftRight((int)shift));
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/** rb_big_rshift
 *
 */
@JRubyMethod(name = ">>", required = 1)
public IRubyObject op_rshift(IRubyObject other) {
  long shift;
  boolean neg = false;
  for (;;) {
    if (other instanceof RubyFixnum) {
      shift = ((RubyFixnum)other).getLongValue();
      if (shift < 0) {
        neg = true;
        shift = -shift;
      }
      break;
    } else if (other instanceof RubyBignum) {
      RubyBignum otherBignum = (RubyBignum)other;
      if (otherBignum.value.signum() >= 0) {
        IRubyObject tmp = otherBignum.checkShiftDown(this);
        if (!tmp.isNil()) return tmp;
      } else {
        neg = true;
      }
      shift = big2long(otherBignum);
      break;
    }
    other = other.convertToInteger();
  }
  return bignorm(getRuntime(), neg ? value.shiftLeft((int)shift) : value.shiftRight((int)shift));
}
org.jrubyRubyBignumcheckShiftDown

Popular methods of RubyBignum

  • newBignum
  • getLongValue
  • getValue
    Getter for property value.
  • <init>
  • addFloat
  • addOther
  • big2dbl
    rb_big2dbl
  • big2long
    rb_big2long
  • bignorm
    rb_big_norm
  • coerceBin
  • coerceCmp
  • compareTo
  • coerceCmp,
  • compareTo,
  • convertToDouble,
  • createBignumClass,
  • dbl_cmp,
  • divmod,
  • even_p,
  • fix2big,
  • getBigIntegerValue

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now