Class java.lang.Long
All Packages    This Package    Previous    Next

Class java.lang.Long

java.lang.Object
   |
   +----java.lang.Number
           |
           +----java.lang.Long

public final class Long
extends Number
The Long class is a wrapper for long values.
Version:
1.12, 31 Jan 1995
Author:
Lee Boynton, Arthur van Hoff

MAX_VALUE
The maximum value a long can have.
MIN_VALUE
The minimum value a long can have.

Long(long)
Constructs a Long object with the specified value.

doubleValue()
Returns the value of the Long as a double.
equals(Object)
Compares this object against some other object.
floatValue()
Returns the value of the Long as a float.
hashCode()
Computes a hashcode for this long.
intValue()
Returns the value of the Long as an int.
longValue()
Returns the value of the Long as a long.
toString()
Returns a string object representing this integer's value.
valueOf(String)
Returns the long that the string represents.

MIN_VALUE
  public final static long MIN_VALUE
The minimum value a long can have.
MAX_VALUE
  public final static long MAX_VALUE
The maximum value a long can have.

Long
  public Long(long value)
Constructs a Long object with the specified value.
Parameters:
value - the value of the long

intValue
  public int intValue()
Returns the value of the Long as an int.
Overrides:
intValue in class Number

longValue

  public long longValue()
Returns the value of the Long as a long.
Overrides:
longValue in class Number

floatValue

  public float floatValue()
Returns the value of the Long as a float.
Overrides:
floatValue in class Number

doubleValue

  public double doubleValue()
Returns the value of the Long as a double.
Overrides:
doubleValue in class Number

toString

  public String toString()
Returns a string object representing this integer's value.
Overrides:
toString in class Object

hashCode

  public int hashCode()
Computes a hashcode for this long.
Overrides:
hashCode in class Object

equals

  public boolean equals(Object obj)
Compares this object against some other object.
Parameters:
obj - the object to compare with
Returns:
true if the object is the same
Overrides:
equals in class Object

valueOf

  public static Long valueOf(String s)
Returns the long that the string represents.
Parameters:
s - the string to be parsed
Returns:
the value of the string
Throws: NumberFormatException
The string cannot be parsed.


All Packages    This Package    Previous    Next