congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RubyBignum.checkShiftDown
Code IndexAdd Tabnine 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)

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

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now