Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.lang
Class IntegerHelper

java.lang.Object
  extended by oracle.adfnmc.java.lang.IntegerHelper

public class IntegerHelper
extends java.lang.Object


Constructor Summary
IntegerHelper()
           
 
Method Summary
static int bitCount(int i)
           Counts the number of 1 bits in the int value passed; this is sometimes referred to as a population count.
static int highestOneBit(int i)
           Determines the highest (leftmost) bit that is 1 and returns the value that is the bit mask for that bit.
static int numberOfLeadingZeros(int i)
           Determines the number of leading zeros in the int passed prior to the highest one bit.
static int numberOfTrailingZeros(int i)
           Determines the number of trailing zeros in the int passed after the lowest one bit.
static int signum(int i)
           The signum function for int values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerHelper

public IntegerHelper()
Method Detail

bitCount

public static int bitCount(int i)

Counts the number of 1 bits in the int value passed; this is sometimes referred to as a population count.

Parameters:
i - The int value to process.
Returns:
The number of 1 bits.
Since:
1.5

numberOfLeadingZeros

public static int numberOfLeadingZeros(int i)

Determines the number of leading zeros in the int passed prior to the highest one bit.

Parameters:
i - The int to process.
Returns:
The number of leading zeros.
Since:
1.5

numberOfTrailingZeros

public static int numberOfTrailingZeros(int i)

Determines the number of trailing zeros in the int passed after the lowest one bit.

Parameters:
i - The int to process.
Returns:
The number of trailing zeros.
Since:
1.5

highestOneBit

public static int highestOneBit(int i)

Determines the highest (leftmost) bit that is 1 and returns the value that is the bit mask for that bit. This is sometimes referred to as the Most Significant 1 Bit.

Parameters:
i - The int to interrogate.
Returns:
The bit mask indicating the highest 1 bit.
Since:
1.5

signum

public static int signum(int i)

The signum function for int values. This method returns -1 for negative values, 1 for positive values and 0 for the value 0.

Parameters:
i - The int value.
Returns:
-1 if negative, 1 if positive otherwise 0.
Since:
1.5

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.