Java Long Number Create toLong(int value)

Here you can find the source of toLong(int value)

Description

Returns the value of the given int as a long , when treated as unsigned.

License

Apache License

Declaration

private static long toLong(int value) 

Method Source Code

//package com.java2s;
//Licensed under the Apache License, Version 2.0 (the "License");

public class Main {
    static final long INT_MASK = 0xffffffffL;

    /**//from www  .ja  v  a  2s  .c  om
     * Returns the value of the given {@code int} as a {@code long}, when treated as unsigned.
     */
    private static long toLong(int value) {
        return value & INT_MASK;
    }
}

Related

  1. toLong(final String str, final long defaultValue)
  2. toLong(final String value)
  3. toLong(final String value)
  4. toLong(final String value)
  5. toLong(int numBytes, long value)
  6. toLong(int x, int z)
  7. toLong(int[] a)
  8. toLong(int[] x, int length, int M)
  9. toLong(Integer i)