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

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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