Public Member Functions | |
| void | decrement (int amount) |
| void | decrement () |
| ERXMutableInteger (int value) | |
| void | increment (int amount) |
| void | increment () |
| int | intValue () |
| void | setIntValue (int value) |
| String | toString () |
Static Public Member Functions | |
| static int | parseInt (String str) throws NumberFormatException |
| static String | toString (int value) |
Private Attributes | |
| int | _value = 0 |
ERXMutableInteger is like Integer but mutable, to avoid the excess object creation involved in i = new Integer(i.getInt() + 1) which can get expensive if done a lot.
Not subclassed from Integer, since Integer is final (for performance.)
Original Author: Ian F. Darwin (Author of "Java Coolbook" ISBN: 0-596-00170-3)
| ERXMutableInteger | ( | int | value | ) |
Constructs a newly allocated ERXMutableInteger object that represents the primitive int argument.
| value | the int value to be represented by the ERXMutalbleInteger object |
| void decrement | ( | int | amount | ) |
Decrements the int value of this ERXMutalbleInteger object by the int argument.
| amount | the int amount to decrement |
| void decrement | ( | ) |
Decrements the int value of this ERXMutalbleInteger object by 1.
| void increment | ( | int | amount | ) |
Increments the int value of this ERXMutalbleInteger object by the int argument.
| amount | the int amount to increment |
| void increment | ( | ) |
Increments the int value of this ERXMutalbleInteger object by 1.
| int intValue | ( | ) |
Returns the int value represented by this ERXMutalbleInteger object.
| static int parseInt | ( | String | str | ) | throws NumberFormatException [static] |
Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' to indicate a negative value. The resulting integer value is returned, exactly as if the argument was given as arguments to the Integer.parseInt method.
| str | the string to parse |
| NumberFormatException | if the String cannot be parsed as an int. |
| void setIntValue | ( | int | value | ) |
Updates the int value of this ERXMutalbleInteger object to the int argument.
| value | the int value to set |
| static String toString | ( | int | value | ) | [static] |
Creates a string representation of the int argument.
| value | the int value to convert |
| String toString | ( | ) |
Returns a string object representing this ERXMutalbeInteger's value. The value is converted to signed decimal representation and returned as a string, exactly as if the integer value were given as an argument to the toString(int) method.
int _value = 0 [private] |
1.5.8