Tabnine Logo
Integer.reverse
Code IndexAdd Tabnine to your IDE (free)

How to use
reverse
method
in
java.lang.Integer

Best Java code snippets using java.lang.Integer.reverse (Showing top 20 results out of 1,683)

origin: stackoverflow.com

byte bitsRev = (byte) (Integer.reverse(aByte) >>> (Integer.SIZE - Byte.SIZE));
origin: com.h2database/h2

@Override
public Object read(ByteBuffer buff, int tag) {
  switch (tag) {
  case TAG_FLOAT_0:
    return 0f;
  case TAG_FLOAT_1:
    return 1f;
  case TAG_FLOAT_FIXED:
    return buff.getFloat();
  }
  return Float.intBitsToFloat(Integer.reverse(DataUtils
      .readVarInt(buff)));
}
origin: goldmansachs/gs-collections

int probeThree(short element, int removedIndex)
{
  int nextIndex = Integer.reverse(SpreadFunctions.shortSpreadOne(element));
  int spreadTwo = Integer.reverse(SpreadFunctions.shortSpreadTwo(element)) | 1;
  while(true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    short keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(int element, int removedIndex)
{
  int nextIndex = Integer.reverse(SpreadFunctions.intSpreadOne(element));
  int spreadTwo = Integer.reverse(SpreadFunctions.intSpreadTwo(element)) | 1;
  while(true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    int valueAtIndex = this.table[nextIndex];
    if (valueAtIndex == element)
    {
      return nextIndex;
    }
    if (valueAtIndex == EMPTY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (valueAtIndex == REMOVED && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(int element, int removedIndex)
{
  int nextIndex = Integer.reverse(SpreadFunctions.intSpreadOne(element));
  int spreadTwo = Integer.reverse(SpreadFunctions.intSpreadTwo(element)) | 1;
  while(true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    int valueAtIndex = this.table[nextIndex];
    if (valueAtIndex == element)
    {
      return nextIndex;
    }
    if (valueAtIndex == EMPTY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (valueAtIndex == REMOVED && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(short element, int removedIndex)
{
  int nextIndex = Integer.reverse(SpreadFunctions.shortSpreadOne(element));
  int spreadTwo = Integer.reverse(SpreadFunctions.shortSpreadTwo(element)) | 1;
  while(true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    short valueAtIndex = this.table[nextIndex];
    if (valueAtIndex == element)
    {
      return nextIndex;
    }
    if (valueAtIndex == EMPTY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (valueAtIndex == REMOVED && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(float element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.floatSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.floatSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    float keyAtIndex = this.keys[nextIndex];
    if (Float.compare(keyAtIndex, element) == 0)
    {
      return nextIndex;
    }
    if (Float.compare(keyAtIndex, EMPTY_KEY) == 0)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (Float.compare(keyAtIndex, REMOVED_KEY) == 0 && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(float element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.floatSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.floatSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    float keyAtIndex = this.keys[nextIndex];
    if (Float.compare(keyAtIndex, element) == 0)
    {
      return nextIndex;
    }
    if (Float.compare(keyAtIndex, EMPTY_KEY) == 0)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (Float.compare(keyAtIndex, REMOVED_KEY) == 0 && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(float element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.floatSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.floatSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    float keyAtIndex = this.keys[nextIndex];
    if (Float.compare(keyAtIndex, element) == 0)
    {
      return nextIndex;
    }
    if (Float.compare(keyAtIndex, EMPTY_KEY) == 0)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (Float.compare(keyAtIndex, REMOVED_KEY) == 0 && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: lealone/Lealone

  @Override
  public Value readValue(ByteBuffer buff, int tag) {
    switch (tag) {
    case TAG_FLOAT_0:
      return ValueFloat.get(0f);
    case TAG_FLOAT_1:
      return ValueFloat.get(1f);
    case TAG_FLOAT_FIXED:
      return ValueFloat.get(buff.getFloat());
    }
    return ValueFloat.get(Float.intBitsToFloat(Integer.reverse(DataUtils.readVarInt(buff))));
  }
};
origin: goldmansachs/gs-collections

int probeThree(int element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.intSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.intSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    int keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(char element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.charSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.charSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    char keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(short element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.shortSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.shortSpreadTwo(element)) | 1;
  while(true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    short keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(short element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.shortSpreadOne(element) << 1;
  int spreadTwo = Integer.reverse(SpreadFunctions.shortSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask((nextIndex >> 1) + spreadTwo) << 1;
    short keyAtIndex = this.keysValues[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(char element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.charSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.charSpreadTwo(element)) | 1;
  while(true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    char keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(short element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.shortSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.shortSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    short keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(char element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.charSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.charSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    char keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: goldmansachs/gs-collections

int probeThree(short element, int removedIndex)
{
  int nextIndex = (int) SpreadFunctions.shortSpreadOne(element);
  int spreadTwo = Integer.reverse(SpreadFunctions.shortSpreadTwo(element)) | 1;
  while (true)
  {
    nextIndex = this.mask(nextIndex + spreadTwo);
    short keyAtIndex = this.keys[nextIndex];
    if (keyAtIndex == element)
    {
      return nextIndex;
    }
    if (keyAtIndex == EMPTY_KEY)
    {
      return removedIndex == -1 ? nextIndex : removedIndex;
    }
    if (keyAtIndex == REMOVED_KEY && removedIndex == -1)
    {
      removedIndex = nextIndex;
    }
  }
}
origin: lealone/Lealone

private void write0(DataBuffer buff, float x) {
  int f = Float.floatToIntBits(x);
  if (f == FLOAT_ZERO_BITS) {
    buff.put((byte) TAG_FLOAT_0);
  } else if (f == FLOAT_ONE_BITS) {
    buff.put((byte) TAG_FLOAT_1);
  } else {
    int value = Integer.reverse(f);
    if (value >= 0 && value <= DataUtils.COMPRESSED_VAR_INT_MAX) {
      buff.put((byte) FLOAT).putVarInt(value);
    } else {
      buff.put((byte) TAG_FLOAT_FIXED).putFloat(x);
    }
  }
}
origin: com.h2database/h2

@Override
public void write(WriteBuffer buff, Object obj) {
  if (!(obj instanceof Float)) {
    super.write(buff, obj);
    return;
  }
  float x = (Float) obj;
  int f = Float.floatToIntBits(x);
  if (f == ObjectDataType.FLOAT_ZERO_BITS) {
    buff.put((byte) TAG_FLOAT_0);
  } else if (f == ObjectDataType.FLOAT_ONE_BITS) {
    buff.put((byte) TAG_FLOAT_1);
  } else {
    int value = Integer.reverse(f);
    if (value >= 0 && value <= DataUtils.COMPRESSED_VAR_INT_MAX) {
      buff.put((byte) TYPE_FLOAT).putVarInt(value);
    } else {
      buff.put((byte) TAG_FLOAT_FIXED).putFloat(x);
    }
  }
}
java.langIntegerreverse

Javadoc

Reverses the order of the bits of the specified integer.

Popular methods of Integer

  • parseInt
    Parses the specified string as a signed integer value using the specified radix. The ASCII character
  • toString
    Converts the specified signed integer into a string representation based on the specified radix. The
  • valueOf
    Parses the specified string as a signed integer value using the specified radix.
  • intValue
    Gets the primitive value of this int.
  • <init>
    Constructs a new Integer from the specified string.
  • toHexString
    Returns a string representation of the integer argument as an unsigned integer in base 16.The unsign
  • equals
    Compares this instance with the specified object and indicates if they are equal. In order to be equ
  • compareTo
    Compares this Integer object to another object. If the object is an Integer, this function behaves l
  • hashCode
  • compare
    Compares two int values.
  • longValue
    Returns the value of this Integer as along.
  • decode
    Parses the specified string and returns a Integer instance if the string can be decoded into an inte
  • longValue,
  • decode,
  • numberOfLeadingZeros,
  • getInteger,
  • doubleValue,
  • toBinaryString,
  • byteValue,
  • bitCount,
  • shortValue,
  • highestOneBit

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • setContentView (Activity)
  • setScale (BigDecimal)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top PhpStorm plugins
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