Integer Methods
The methods defined in the Integer primitive type are summarized in the following table.
Method | Description |
---|---|
abs | Returns the absolute value of the receiver |
bitAnd | Returns an integer representing the receiver bits ANDed with the argument |
bitNot | Returns an integer whose bit values are the inverse of the bit values of the receiver |
bitOr | Returns an integer representing the receiver bits ORed with the argument |
bitXor | Returns an integer representing the receiver bits XORed with the argument |
display | Returns the receiver as a string |
isEven | Returns true if the receiver represents an even number; otherwise false |
isOdd | Returns true if the receiver represents an odd number; otherwise false |
max | Returns the larger value of the receiver and a specified Integer |
min | Returns the lesser value of the receiver and a specified Integer |
numberFormat | Returns a string in the number format of the current locale |
padLeadingWith | Returns a copy of the receiver padded to the specified length with a leading character |
parseCurrencyWithCurrentLocale | Sets the receiver to the result of parsing a string representing a currency value for the current locale |
parseCurrencyWithFmtAndLcid | Sets the receiver to the result of parsing a string representing a currency value for the specified format and the specified locale |
parseNumberWithCurrentLocale | Sets the receiver to the result of parsing a string representing a number for the current locale |
parseNumberWithFmtAndLcid | Sets the receiver to the result of parsing a string representing a number for the specified format and the specified locale |
setByteOrderLocal | Returns an integer that has the bytes ordered as required by the local node |
setByteOrderRemote | Returns an integer that has the bytes ordered as required by a specified remote node |
userCurrencyFormat | Returns the receiver as a string in the specified currency format |
userCurrencyFormatAndLcid | Returns the receiver as a string in the specified currency format for the specified locale |
userNumberFormat | Returns the receiver as a string in the specified number format |
userNumberFormatAndLcid | Returns the receiver as a string in the specified number format for the specified locale |