java.lang
Class Long
java.lang.Object
|
+--java.lang.Number
|
+--java.lang.Long
- All Implemented Interfaces:
- Comparable, java.io.Serializable
- public final synchronized class Long
- extends Number
- implements Comparable
MIN_VALUE
public static final long MIN_VALUE
MAX_VALUE
public static final long MAX_VALUE
TYPE
public static final Class TYPE
Long
public Long(long)
Long
public Long(String)
throws NumberFormatException
toString
public static String toString(long,
int)
toHexString
public static String toHexString(long)
toOctalString
public static String toOctalString(long)
toBinaryString
public static String toBinaryString(long)
toString
public static String toString(long)
parseLong
public static long parseLong(String,
int)
throws NumberFormatException
parseLong
public static long parseLong(String)
throws NumberFormatException
valueOf
public static Long valueOf(String,
int)
throws NumberFormatException
valueOf
public static Long valueOf(String)
throws NumberFormatException
decode
public static Long decode(String)
throws NumberFormatException
byteValue
public byte byteValue()
- Overrides:
byteValue
in class Number
shortValue
public short shortValue()
- Overrides:
shortValue
in class Number
intValue
public int intValue()
- Specified by:
intValue
in class Number
longValue
public long longValue()
- Specified by:
longValue
in class Number
floatValue
public float floatValue()
- Specified by:
floatValue
in class Number
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in class Number
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object)
- Description copied from class:
Object
- Determines if this object is "equal" to another object.
In general, objects should be instances of the same class
with the same guts to be considered equal. For example,
the code below only prints same value since
s
and t
are different strings though
they have the same value: "hello".
String s = new String("hello");
String t = new String("hello");
if (s.equals(t)) System.out.println("same value");
if (s == t) System.out.println("same string");
- Overrides:
equals
in class Object
- Following copied from class:
java.lang.Object
- Parameters:
is
- the other Object to which this one is compared- Returns:
- true if this Object is equal to
other
getLong
public static Long getLong(String)
getLong
public static Long getLong(String,
long)
getLong
public static Long getLong(String,
Long)
compareTo
public int compareTo(Long)
compareTo
public int compareTo(Object)
- Specified by:
compareTo
in interface Comparable