Method Signature | Description | Parameters | Example |
---|---|---|---|
| Returns an Integer value representing the contents of the String passed as an argument. | String string - String from which to extract an integer value. |
|
| Integer.valueOf(String string, Int radix) Returns an Integer value representing the value of a String passed as an argument. | String string - String from which to extract an Integer value. Int radix - Specifies the radix to use when converting the String argument into an Integer, for example, 2, 8, 16. |
|
Additional Integer Methods
Method Signature | Description | Parameters | Example |
---|---|---|---|
| Returns the number of one bits in the binary representation of the Int value passed as an argument. | Int value -Int value containing one bits to be counted. |
|
| Compares the value of the first Int passed as an argument to the value of the second Int passed as an argument. Returns 0 if the values are equal, returns less than 0 if the first argument is less than the second, and returns a value greater than 0 if the first argument is greater than the second. | Int x - The first Int value to compare. Int y - The second Int value to compare. |
|
| Returns the result of converting the String passed as an argument into an Int value. The argument String must be in decimal, hexadecimal, or octal format. | String number - String to convert into an Int value. |
|
| Returns a hash code representing the Integer calling this method. | No method parameters. |
|
| Returns an Int value with at most a single one bit in the position of the leftmost one bit contained in the binary representation of the Int value passed as an argument. | Int value - Integer value containing one bits in its binary representation. |
|
| Returns an Int value with at most a single one bit in the position of the rightmost one bit contained in the binary representation of the Int value passed as an argument. | Int value - Integer value containing one bits in its binary representation. |
|
| Returns the number of zeros preceding the leftmost one bit in the binary representation of the Int value passed as an argument. | Int value - Integer value containing one bits in its binary representation. |
|
| Returns the number of zeros following the rightmost one bit in the binary representation of the Int value passed as an argument.
| Int value - Integer value containing one bits in its binary representation. |
|
| Returns the result of reversing the order of bits contained in the binary representation of the Int value passed as an argument. | Int value - Integer value containing one bits in its binary representation. |
|
| Returns the result of rotating the binary representation of the Int value passed as an argument left by the value specified by the second Int value passed as an argument. | Int value - Integer value containing one bits in its binary representation. Int distance - Number of places to rotate the binary representation of the first argument left. |
|
| Returns the result of rotating the binary representation of the Int value passed as an argument right by the value specified by the second Int value passed as an argument. | Int value - Integer value containing one bits in its binary representation. Int distance - Number of places to rotate the binary representation of the first argument right. |
|
| Returns the signum function of the Int value passed as an argument. The signum value indicates whether an integer is positive, negative, or zero. | Int value - Int value against which to calculate signum. |
|
| Returns a string representation of the binary representation of the Int value passed as an argument. | Int value - Integer value to convert to a binary representation. |
|
| Returns a string representation of the hexadecimal representation of the Int value passed as an argument. | Int value - Integer value to convert to a hexadecimal representation. |
|
| Returns a string representation of the octal representation of the Int value passed as an argument. | Int value - Integer value to convert to an octal representation. |
|