public final class NativeLong extends Number implements Comparable<NativeLong>
In C, a long
can be either 32 bits or 64bits, depending on the platform.
long
in the C definition with
a NativeLong.构造器和说明 |
---|
NativeLong(int value)
Creates a new
NativeLong instance with the supplied value. |
NativeLong(long value)
Creates a new
NativeLong instance with the supplied value. |
限定符和类型 | 方法和说明 |
---|---|
int |
compareTo(NativeLong other)
Compares two
NativeLong instances numerically. |
double |
doubleValue()
Returns an
double representation of this NativeLong . |
boolean |
equals(Object obj)
Compares this
NativeLong to another NativeLong . |
float |
floatValue()
Returns an
float representation of this NativeLong . |
int |
hashCode()
Gets a hash code for this
NativeLong . |
int |
intValue()
Returns an integer representation of this
NativeLong . |
long |
longValue()
Returns an
long representation of this NativeLong . |
String |
toString()
Returns a string representation of this
NativeLong . |
static NativeLong |
valueOf(int value)
Returns a NativeLong instance representing the specified int value
|
static NativeLong |
valueOf(long value)
Returns a NativeLong instance representing the specified long value
|
byteValue, shortValue
public NativeLong(long value)
NativeLong
instance with the supplied value.value
- a long or integer.public NativeLong(int value)
NativeLong
instance with the supplied value.value
- an integer.public final int intValue()
NativeLong
.public final long longValue()
long
representation of this NativeLong
.public final float floatValue()
float
representation of this NativeLong
.floatValue
在类中 Number
float
value for this NativeLong
.public final double doubleValue()
double
representation of this NativeLong
.doubleValue
在类中 Number
double
value for this NativeLong
.public final int hashCode()
NativeLong
.public final boolean equals(Object obj)
NativeLong
to another NativeLong
.public String toString()
NativeLong
.public final int compareTo(NativeLong other)
NativeLong
instances numerically.compareTo
在接口中 Comparable<NativeLong>
other
- the other NativeLong to compare to.0
if other
is equal to this instance, -1 if this
instance is numerically less than other
or 1 if this instance is
numerically greater than other
.public static NativeLong valueOf(long value)
value
- a long valueNativeLong
instance representing value
public static NativeLong valueOf(int value)
value
- a 32bit integer valueNativeLong
instance representing value
Copyright © 2021. All rights reserved.