Java java.lang Integer fields, constructors, methods, implement or subclass

Example usage for Java java.lang Integer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.lang Integer.

The text is from its open source code.

Field

intMIN_VALUE
A constant holding the minimum value an int can have, -231.
intMAX_VALUE
A constant holding the maximum value an int can have, 231-1.
ClassTYPE
The Class instance representing the primitive type int .
intSIZE
The number of bits used to represent an int value in two's complement binary form.
intBYTES
The number of bytes used to represent an int value in two's complement binary form.

Constructor

Integer(int value)
Constructs a newly allocated Integer object that represents the specified int value.
Integer(String s)
Constructs a newly allocated Integer object that represents the int value indicated by the String parameter.

Method

intbitCount(int i)
Returns the number of one-bits in the two's complement binary representation of the specified int value.
bytebyteValue()
Returns the value of this Integer as a byte after a narrowing primitive conversion.
intcompare(int x, int y)
Compares two int values numerically.
intcompareTo(Integer anotherInteger)
Compares two Integer objects numerically.
Integerdecode(String nm)
Decodes a String into an Integer .
intdivideUnsigned(int dividend, int divisor)
Returns the unsigned quotient of dividing the first argument by the second where each argument and the result is interpreted as an unsigned value.
doubledoubleValue()
Returns the value of this Integer as a double after a widening primitive conversion.
booleanequals(Object obj)
Compares this object to the specified object.
floatfloatValue()
Returns the value of this Integer as a float after a widening primitive conversion.
ClassgetClass()
Returns the runtime class of this Object .
IntegergetInteger(String nm)
Determines the integer value of the system property with the specified name.
IntegergetInteger(String nm, int val)
Determines the integer value of the system property with the specified name.
IntegergetInteger(String nm, Integer val)
Returns the integer value of the system property with the specified name.
inthashCode()
Returns a hash code for this Integer .
inthashCode(int value)
Returns a hash code for an int value; compatible with Integer.hashCode() .
inthighestOneBit(int i)
Returns an int value with at most a single one-bit, in the position of the highest-order ("leftmost") one-bit in the specified int value.
intintValue()
Returns the value of this Integer as an int .
longlongValue()
Returns the value of this Integer as a long after a widening primitive conversion.
intlowestOneBit(int i)
Returns an int value with at most a single one-bit, in the position of the lowest-order ("rightmost") one-bit in the specified int value.
intmax(int a, int b)
Returns the greater of two int values as if by calling Math#max(int,int) Math.max .
intmin(int a, int b)
Returns the smaller of two int values as if by calling Math#min(int,int) Math.min .
intnumberOfLeadingZeros(int i)
Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified int value.
intnumberOfTrailingZeros(int i)
Returns the number of zero bits following the lowest-order ("rightmost") one-bit in the two's complement binary representation of the specified int value.
intparseInt(String s)
Parses the string argument as a signed decimal integer.
intparseInt(String s, int radix)
Parses the string argument as a signed integer in the radix specified by the second argument.
intparseUnsignedInt(String s, int radix)
Parses the string argument as an unsigned integer in the radix specified by the second argument.
intparseUnsignedInt(String s)
Parses the string argument as an unsigned decimal integer.
intreverse(int i)
Returns the value obtained by reversing the order of the bits in the two's complement binary representation of the specified int value.
intreverseBytes(int i)
Returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified int value.
introtateLeft(int i, int distance)
Returns the value obtained by rotating the two's complement binary representation of the specified int value left by the specified number of bits.
introtateRight(int i, int distance)
Returns the value obtained by rotating the two's complement binary representation of the specified int value right by the specified number of bits.
shortshortValue()
Returns the value of this Integer as a short after a narrowing primitive conversion.
intsignum(int i)
Returns the signum function of the specified int value.
intsum(int a, int b)
Adds two integers together as per the + operator.
StringtoBinaryString(int i)
Returns a string representation of the integer argument as an unsigned integer in base 2.
StringtoHexString(int i)
Returns a string representation of the integer argument as an unsigned integer in base 16.
StringtoOctalString(int i)
Returns a string representation of the integer argument as an unsigned integer in base 8.
StringtoString()
Returns a String object representing this Integer 's value.
StringtoString(int i)
Returns a String object representing the specified integer.
StringtoString(int i, int radix)
Returns a string representation of the first argument in the radix specified by the second argument.
longtoUnsignedLong(int x)
Converts the argument to a long by an unsigned conversion.
StringtoUnsignedString(int i)
Returns a string representation of the argument as an unsigned decimal value.
IntegervalueOf(String s)
Returns an Integer object holding the value of the specified String .
IntegervalueOf(int i)
Returns an Integer instance representing the specified int value.
IntegervalueOf(String s, int radix)
Returns an Integer object holding the value extracted from the specified String when parsed with the radix given by the second argument.