public final class Long extends Object
Modifier and Type | Field and Description |
---|---|
static long |
MAX_VALUE
The largest value of type long.
|
static long |
MIN_VALUE
The smallest value of type long.
|
Constructor and Description |
---|
Long(long value)
Constructs a newly allocated Long object that represents the primitive long argument.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleValue()
Returns the value of this Long as a double.
|
boolean |
equals(Object obj)
Compares this object against the specified object.
|
float |
floatValue()
Returns the value of this Long as a float.
|
int |
hashCode()
Computes a hashcode for this Long.
|
long |
longValue()
Returns the value of this Long as a long value.
|
static long |
parseLong(String s)
Parses the string argument as a signed decimal long.
|
static long |
parseLong(String s,
int radix)
Parses the string argument as a signed long in the radix specified by the second argument.
|
String |
toString()
Returns a String object representing this Long's value.
|
static String |
toString(long i)
Returns a new String object representing the specified integer.
|
static String |
toString(long i,
int radix)
Creates a string representation of the first argument in the radix specified by the second argument.
|
static Long |
valueOf(long i)
Returns the object instance of i
|
public static final long MAX_VALUE
public static final long MIN_VALUE
public Long(long value)
public double doubleValue()
public boolean equals(Object obj)
public float floatValue()
public int hashCode()
public long longValue()
public static long parseLong(String s) throws NumberFormatException
NumberFormatException
public static long parseLong(String s, int radix) throws NumberFormatException
NumberFormatException
public String toString()
public static String toString(long i)
public static String toString(long i, int radix)
public static Long valueOf(long i)
i
- the primitive