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

E17503-02

oracle.adfnmc.java.lang
Class LongHelper

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

public class LongHelper
extends java.lang.Object


Constructor Summary
LongHelper()
           
 
Method Summary
static int bitCount(long lng)
           Counts the number of 1 bits in the long value passed; this is sometimes referred to as a population count.
static int compareTo(java.lang.Long objectA, java.lang.Long objectB)
           
static int numberOfLeadingZeros(long lng)
           Determines the number of leading zeros in the long passed prior to the highest one bit.
static int numberOfTrailingZeros(long lng)
           Determines the number of trailing zeros in the long passed after the lowest one bit.
static int signum(long lng)
           The signum function for long values.
static java.lang.String toHexString(long l)
          Answers a string containing characters in the range 0..7, a..f which describe the hexadecimal representation of the argument.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongHelper

public LongHelper()
Method Detail

numberOfLeadingZeros

public static int numberOfLeadingZeros(long lng)

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

Parameters:
lng - The long to process.
Returns:
The number of leading zeros.
Since:
1.5

numberOfTrailingZeros

public static int numberOfTrailingZeros(long lng)

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

Parameters:
lng - The long to process.
Returns:
The number of trailing zeros.
Since:
1.5

bitCount

public static int bitCount(long lng)

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

Parameters:
lng - The long value to process.
Returns:
The number of 1 bits.
Since:
1.5

signum

public static int signum(long lng)

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

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

toHexString

public static java.lang.String toHexString(long l)
Answers a string containing characters in the range 0..7, a..f which describe the hexadecimal representation of the argument.

Parameters:
l - a long to get the hex representation of
Returns:
String the hex representation of the argument

compareTo

public static int compareTo(java.lang.Long objectA,
                            java.lang.Long objectB)

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.