|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Number
org.knime.core.util.MutableInteger
public final class MutableInteger
This class is essentially an integer whose value can be changed. The hash code and therefore also the equals change dynamically with the value stored. Be patient not to use this object as a key in a hashtable and such.
| Constructor Summary | |
|---|---|
MutableInteger(int i)
Creates a new mutable integer. |
|
| Method Summary | |
|---|---|
void |
add(int value)
Adds the given value to this mutable integer. |
int |
dec()
Decrements this integer by one. |
double |
doubleValue()
|
boolean |
equals(Object obj)
|
float |
floatValue()
|
int |
hashCode()
|
int |
inc()
Increments this integer by one. |
int |
intValue()
|
long |
longValue()
|
void |
setValue(int newValue)
Sets the value of this integer. |
String |
toString()
|
| Methods inherited from class java.lang.Number |
|---|
byteValue, shortValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MutableInteger(int i)
i - the start value| Method Detail |
|---|
public int intValue()
intValue in class Numberpublic long longValue()
longValue in class Numberpublic float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic void setValue(int newValue)
newValue - the new valuepublic int inc()
public void add(int value)
value - the value to addpublic int dec()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||