Make your own free website on Tripod.com

Methods

final classByte

final Short

final Integer

final Long

final Float

final double

Constructors

Byte(byte value)

 Byte(String s) throws NumberFormatException

See parseByte

public Short(short value)

public Short(String s)

      throws NumberFormatException

see ParseShort

public Integer(int value)

public Integer(String s)

        throws NumberFormatException

see ParseInteger

 

Long(long value)

public Long(String s)

        throws NumberFormatException

see ParseLong

 

 

Float(double value)
Float(float value)
Float(String s)

Double(double value)

Double(String s)

 

see valueOf(String)

int compare(float, float)

does not have

doest not have

doest not have

doest not have

returns new Float(f1).compareTo(new Float(f2))

 

same idea as float

int compareTo( numobj)

If this byte is,

 Equal 0

 if less less than 0

 if greater greater 0

to argument

If this short is,

 Equal 0

 if less less than 0

 if greater greater 0

to argument

Like others

Like others

like others but differs from normal operators like == <= etc

·  Float.NaN considered equal to itself and greater than all other float values Float.POSITIVE_INFINITY).

·  0.0f is considered by this method to be greater than -0.0f

this is to obey the general contract for Comparable.compareTo, and that the natural order on Floats is consistent with equals.

same ideas as float

int compareTo(Object o)

 

Behaves like above. Otherwise, it throws a ClassCastException (as Byte objects are only comparable to other Byte objects)

Behaves like above. Otherwise, it throws a ClassCastException (as Short objects are only comparable to other Byte objects)

Like others

Like others

see above 

see above

objtype

decode(String nm)                   throws NumberFormatException

 

Decodes “0x” “0X” “0” “#” and recognizes sign. Uses parseByte with radix

Same idea as Byte

Same as others

Same as others

does not have

does not have

Java.lang.Number interface

short shortValue()

byte byteValue()

integer integerValue()

long longValue()

float floatValue()

double doubleValue()

 

Returns the primitive type stored in the object.

Returns the primitive stored in the object

Same as others

Same as others

same as others

same as others

boolean equals(object)

true if not null and is a Byte object that contains the same byte value

Same idea as Short

Same as others

Same as others

If both represent Float.NaN, returns true.

If f1 represents +0.0f while f2 represents -0.0f, or vice versa, the equal test has the value false. .

Same as float

int hashCode()

Overridden

Overridden

Equal to the primitive int value of this object

(int)(this.longValue()^(this.longValue()>>>32))

 

returns floatToIntBits(float),

returns

(int)(v^(v>>>32))

 

byte parsexxx(String s)                      throws NumberFormatException

 

String must be all numbers except – sign, see below

Same idea as Short

Same as others

Same as others

NOTE: neither the character L ('\u004C') nor l ('\u006C') is permitted to appear at the end of the string

same as others but

specifiers, specifiers that determine the type of a floating-point literal (1.0f is a float value; 1.0d is a double value), do not influence the results of this method

same as float

Primitive type parsexxx(String s,

                             int radix)                      throws NumberFormatException

 

Exception thrown if:

·  null or is a string of length zero.

·  The radix is either smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX.

·  not a digit of the specified radix, except that the first character may be a minus sign '-' ('\u002D') provided that the string is longer than length 1.

·  The value represented by the string is not a value of type byte.

Same idea as Short

Same as others

Same as above but with radix

Does not have

Does not have

String toString()

Returns string

Same as others

Same as others

same

can print –Infinity Infinity –0 0  NaN

if number is greater or qual to 10-3 and  less than 107 prints normal otherwise prints in scientific notation.

same as float

String toString(primitive Val)

Returns String of byte.

Same as others

Same as others

same

see above

see above

String toBinaryString(

primitive i)

Does not have

Does not have

If i<0 string = 232 +i

If i>0 string = i

String returned as binary

if i<0 string= 264+i

if i>0 string = i

String returned as binary

 

Does not have

Does not have

String toHexString( primitive i)

Does not have

Does not have

If i<0 string = 232 +i

If i>0 string = i

String returned as hex

if i<0 string= 264+i

if i>0 string = i

String returned as hex

Doest not have

Does not have

String toOctalString( pimitive i)

Does not have

Does not have

If i<0 string = 232 +i

If i>0 string = i

String returned as ioct

if i<0 string= 264+i

if i>0 string = i

String returned as oct

Does not have

Does not have

Objtype valueOf(String s)

Returns

new Byte(Byte.parseByte(s))

Returns

new Short(Short.parseShort(s))

new Integer (Integer.parseInt(s))

new Long(Long.parseLong(s))

 

the specifyers are ignored (“f” and “d”)

See float

Objtype valueOf(String s, int radix)

Returns

new Byte(Byte.parseByte(s, radix))

Returns

new Short(Short.parseShort(s, radix))

new Integer (Integer.parseInt(s, radix))

new Long(Long.parseLong(s, radix))

doest not have

Doest not have

Static Integer getxxxx(String nm)

 

static Integer getxxxx(String nm,                                 int val)

 

static Integer getxxxx(String nm,                                 Integer val)

 

 

does not have

does not have

These three methods return the value of the System property through System.getProperty(java.lang.String)

 

If the system property does not exist, or the property numerifc format is incorrect, or nm is null then:

 

Static Integer getInteger(String nm)

Returns null is returned

static Integer getInteger(String nm,                                 int val)

the default value val is returned

static Integer getInteger(String nm,                                 Integer val)

the default value val is returned

 

 

 

same as in Integer except Long is returned.

does not have

Doest not have

Boolean isNan()

static boolean isNan(primitive type)

Does not have

 

 

 

same as double but with float

Returns true if this method or primitive type provided is NaN

public boolean isInfinite()

static boolean

isInfinite(double v)

Doest not have

 

 

 

same as double but with float

Returns true if this method or primitive type is +infinity or

-infinity.

Constants

MAX_VALUE

MIN_VALUE

Class TYPE

MAX_VALUE

MIN_VALUE

Class TYPE

MAX_VALUE

MIN_VALUE

Class TYPE

MAX_VALUE

MIN_VALUE

Class TYPE

 

float MAX_VALUE, float MIN_VALUE,

float NAN, float NEGATIVE_INFINITY, float POSITIVE_INFINITY,

Class TYPE

float MAX_VALUE, float MIN_VALUE,

float NAN, float NEGATIVE_INFINITY, float POSITIVE_INFINITY,

Class TYPE